What can I get number of clicked element
<p>I have a few elements with identical class names.</p>

<p>How can I get the number of the elements which I clicked with <code>onclick</code> events?</p>

<p>For example:</p>

<pre><code>var x = document.getElementsByClassName("myclass").length;

for (a=0; a&lt;=x; a++)
{
     // here i want get number of clicked myclass
}
</code></pre>