JS. How to get list of div's with similar class name? <p>I have html, like this:</p> <pre><code>&lt;div id="c0" class="bz_comment bz_first_comment"&gt;&lt;/div&gt; &lt;div id="c1" class="bz_comment"&gt;&lt;/div&gt; &lt;div id="c2" class="bz_comment"&gt;&lt;/div&gt; &lt;div class="bz_add_comment"&gt;&lt;/div&gt; </code></pre> <p>How can I get array of all the div's (3 div in example) by class that's starts with "bz_comment[anysymbols]" in JavaScript (not using JQuery)? </p> <p>Or can i get array of div's by id that's starts with "c[numeric_value]"?</p> <pre><code>[numeric_value_can_consist_of_some_numbers] </code></pre> <p>It's the similar question like stackoverflow.com/questions/1225611/ (but i don't have reputation to ask in that question). Thanks in advance.</p>