条件循环错在哪里了
<body>
<div id="content">
<h1>html</h1>
<h1>php</h1>
<h1>javascript</h1>
<h1>jquery</h1>
<h1>java</h1>
</div>
<script type="text/javascript">
function clearText() {
var content=document.getElementById("content");
for(var i=0;i<content.childNodes.length;i++){
var x=content.removeChild(content.childNodes[i]);}/
return x;
}
</script>
<button onclick="clearText()">清除节点内容</button>
</body>
</html>