var table = document.getElementById("table-body");
var row = table.insertRow(-1);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
cell1.innerHTML = ingredient_name;
cell2.innerHTML = ingredient_amount;
cell3.innerHTML = ingredient_unit;
cell4.innerHTML = '<button type="button" class="close" aria-.hidden="true"onClick="$(this).closest(\'tr\').remove()">×</button>';
방금 만든 행이나 테이블의 ID를 어떻게 설정합니까?새로 생성 된 테이블 행 또는 셀의 ID는 어떻게 설정합니까?
는'row.id = "행 ID"를 설정 않았다'작동하지? – squid314
나는 계속 함수를 정의하지 못했습니다. – user2179936