how to get all the div in javascript?
<pre><code>&lt;div class="web_index"&gt;
&lt;div style="display:block" &gt;content 1&lt;/div&gt;
&lt;div style="display:none"&gt;content 2&lt;/div&gt;
&lt;div style="display:none"&gt;content 3&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>i used</p>

<pre><code> var div =document.getElementsByClass("web_index").getElementsByTagName("div");
</code></pre>

<p>it tips me there <code>TypeError: document.getElementsByClass is not a function</code>.why, and how to get all the <code>div</code> in the <code>web_index</code> div?</p>
