for循环和while循环的区别
function clearText() { var content=document.getElementById("content"); var childarr=content.childNodes; while(childarr[0]){ content.removeChild(childarr[0]); } }
为什么用for代替while不行呢
function clearText() { var content=document.getElementById("content"); var childarr=content.childNodes; while(childarr[0]){ content.removeChild(childarr[0]); } }
为什么用for代替while不行呢
2017-05-06
举报