JavaScript - DOM nodeValue problem
<p>Why the function <code>NodeValue__Two()</code> show <code>null</code>? To me, it should show the same thing as the function <code>NodeValue__One()</code>.</p>

<p>I have tested this on IE6.</p>

<pre><code>&lt;html&gt;
&lt;body&gt;
&lt;script language="JavaScript"&gt;
function NodeValue__One() 
{
   alert(myNodeOne.childNodes(0).nodeValue);//This is OK   
}

function NodeValue__Two() 
{
   alert(document.all[6].nodeValue);//This is NOT OK
}
&lt;/script&gt;

&lt;p&gt;This PARAGRAPH has two nodes, 
    &lt;b id="myNodeOne"&gt;Node One Text&lt;/b&gt;, and 
    &lt;b id="myNodeTwo"&gt;Node Two Text&lt;/b&gt;.
    &lt;input id="txt1" type="text" value="Damn!!!" /&gt; 
&lt;/p&gt;

&lt;button onclick="NodeValue__One();"&gt;Node Value 1&lt;/button&gt;&lt;/br&gt;
&lt;button onclick="NodeValue__Two();"&gt;Node Value 2&lt;/button&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
