為什么這樣沒有回顯啊,求人解救
function clearText() {
? var content=document.getElementById("content");
? // 在此完成該函數(shù)
? /*
??? while(content.firstChild)
????? content.removeChild(content.firstChild);*/
??? content.removeChild(del);
???? tip.innerHTML = "del<br />";
??? if(!content.childNode.length)
????? {
???????? var tip = document.createElement("h1");
????????? tip.innerHTML = "There is no node!<br />";
????? }
?? content.parentNode.appendChild(tip); ?
}
2015-12-30
代碼好像不全,要不補(bǔ)充下?
加油——redRibbon.