'nodeType' Example : nodeType « Javascript Properties « JavaScript Reference

'nodeType' Example

    
<html>
<body>
<script language="JavaScript">
function function3() {
   alert(document.all.myNodeOne.nodeType);
}
</script>
<p>This PARAGRAPH has two nodes, 
    <b id="myNodeOne">Node One</b>, and 
    <b id="myNodeTwo">Node Two</b>.
</p>
<button onclick="function3();">Node One Type</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'nodeType' Syntax and Note
2.'nodeType' Possible Values
3.'nodeType' is applied to