How to click multiple instances of the same icon on a webpage? (Javascript)
<p>I want to write a script that will click every instance of a certain icon. The following code is from the source that is what I want to click on. It has a onclick event defined, I just don't know how to search the page for these icons and then click on them. Can anyone help? Thanks.</p>

<pre><code>&lt;dl class="recommend"&gt;
    &lt;dt class='recs'&gt;
        &lt;a href="javascript://" onclick="RecSpy('article', '6107445', 'tippers'); return false;"&gt;1&lt;/a&gt;&amp;nbsp;
    &lt;/dt&gt;
    &lt;dd&gt;
        &lt;a href="javascript:void(0);" onclick="RecommendItem(1,'article','6107445','1','recommendstatus_article6107445'); return false;" onmouseover="return overlib('Give thumbs up', WRAP);" onmouseout="return nd();"&gt;&amp;nbsp;
            &lt;img class='icon' title='' alt='Thumb up' style='background-position: -304px -48px;' src='http://geekdo-images.com/images/pixel.gif' /&gt;
        &lt;/a&gt;
    &lt;/dd&gt;
    &lt;dt class='tippers'&gt;
        &lt;a href="javascript://" style='color: #969600;' onclick="RecSpy('article', '6107445', 'tippers'); return false;"&gt;&lt;/a&gt;
    &lt;/dt&gt;
    &lt;dd&gt;
        &lt;a href="javascript:void(0);" onmouseover="return overlib('GeekGold Tip', WRAP );" onmouseout="nd();" onClick="GeekGoldTip(0,'article','6107445','recommendstatus_article6107445'); return false;"&gt;&amp;nbsp;
            &lt;img class='icon' title='' alt='tip' style='background-position: -368px -48px;'   src='http://geekdo-images.com/images/pixel.gif' /&gt;
        &lt;/a&gt;
     &lt;/dd&gt;
     &lt;dd&gt;
         &lt;a href="javascript:void(0);" onclick="RecommendItem(0,'article','6107445','','recommendstatus_article6107445', 'article6107445' ); return false;" onmouseover="return overlib('Hide this post', WRAP);" onmouseout="return nd();"&gt;&amp;nbsp;
             &lt;img class='icon' title='' alt='Thumb up' style='background-position: -336px -48px;' src='http://geekdo-images.com/images/pixel.gif'/&gt;
         &lt;/a&gt;
     &lt;/dd&gt;
     &lt;dt class='thumbsdown'&gt;&lt;/dt&gt;
 &lt;/dl&gt;
</code></pre>
