js动态删除节点
<script type="text/javascript"> function clearText() { var content=document.getElementById("content"); for (var i=content.childNodes.length-1;i>=0;i--) { var childNode = content.childNodes[i]; content.removeChild(childNode); } } </script>
采用逆序来删除