Se faccio così
<html>
<head>
<script>
function mostra(){
for(n=0;n<document.childNodes[0].childNodes.length;n++)
{
alert(document.childNodes[0].childNodes[n].nodeName);
}
}
window.onload=mostra;
</script>
</head><body>
</body>
</html>
mi sparisce quel #text e ottengo:
- HEAD
- BODY
Nessun commento:
Posta un commento