13 lines
243 B
JavaScript
13 lines
243 B
JavaScript
|
|
||
|
function clear(node) {
|
||
|
while (node.hasChildNodes()) {
|
||
|
clear(node.firstChild);
|
||
|
}
|
||
|
node.parentNode.removeChild(node);
|
||
|
}
|
||
|
|
||
|
function clearInner(node) {
|
||
|
while (node.hasChildNodes()) {
|
||
|
clear(node.firstChild);
|
||
|
}
|
||
|
}
|