为啥点两下才删掉一个呢? function clearText() { var content=document.getElementById("content"); var x=content.childNodes; for(i=0;i<=x.length;i++){ content.removeChild(x[i]); break; }
for循环应该这样写for(i=x.length-1;i>=0;i--)