for 函數中 content.removeChild(content.childNodes[0]); 為什么不是 content.removeChild(content.childNodes[i]);
function clearText() {
? var content=document.getElementById("content");
? var nole=content.childNodes.length;
? for(var i=0;i<nole;i++)
? {
????? content.removeChild(content.childNodes[0]);?? //問題
? }
? // 在此完成該函數
?}
為什么是 content.removeChild(content.childNodes[0]);而不是 content.r
emoveChild(content.childNodes[i]);
2015-12-25
oooooooooo