求教代码哪里错了
<script type="text/javascript"> var x=document.getElementsById("con"); for(var i in x.childNodes){ if(x.childNodes[i].nodeType!=1){ x.removeChild(x.childNodes[i]); } } document.write(x.firstChild.nodeName+","+x.firstChild.nodeValue); document.write(x.lastChid.nodeName+","+x.lastChild.nodeVale); </script>