源自:9-14 删除节点removeChild()
function clearText() { var content=document.getElementById("content"); for(var i=0;i<content.chlidNodes.length-1;i++){ var s = content.childNodes[i]; content.removeChild(s); } } buxing a
function clearText() {
var content=document.getElementById("content");
for(var i=0;i<content.chlidNodes.length-1;i++){
var s = content.childNodes[i];
content.removeChild(s);
}
}
怎么不行啊?
提问者:qq_远方_41
2016-07-14 17:23