javascript getElementsByName does not work on divs
<p>I cannot use id</p>

<pre>
<code>
&lt;javascript&gt;
divs = document.getElementsByName("mydiv");
console.log('length: ' + divs.length);

&lt;body&gt;

&lt;div name='mydiv'&gt;foo&lt;/div&gt;
&lt;div name='mydiv'&gt;bar&lt;/div&gt;
&lt;/body&gt;
</code>
</pre>

<p>console: 0</p>

<p>Thanks!</p>
