Parent Child1 Child2 Child3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<title>DOM Node Test</title>
<script type="text/javascript">
function do_nodes(){
    var parent = document.getElementById("parent");
    nodeList = parent.childNodes;
    child1 = nodeList[1];
    child1prime = document.getElementById("child1");
    if (child1 == child1prime){
        alert("True");
    }else{
        alert("False");
    }
    
}
</script>
</head>
<body onload="do_nodes();">

<div id="parent">Parent
<span id="child1">Child1</span>
<span id="child2">Child2</span>
<span id="child3">Child3</span>
</div>

</body>
</html>

<?php echo highlight_file(__FILE__); ?>
1