웹 프로그래밍
[웹프로그래밍] 부모 태그 내 자식 모두 삭제
Ratataca
2022. 9. 2. 13:52
var row = document.getElementById('table-area');
if (row.childElementCount > 0) {
while (row.hasChildNodes()) {
row.removeChild(row.firstChild);
}
}