title: how to get the id of a link onclick using javascript?
body: <p>Hi may i know how can i get my id of my links using javascript? the scenario was i have 3 links i want to get the element by tagname? is it possible?</p>
  
  <pre><code>&lt;a href="docview.php?id=25" id="1"&gt;July 3, 2013&lt;/a&gt;
  &lt;a href="docview.php?id=26" id="2"&gt;July 10, 2013&lt;/a&gt;
  &lt;a href="docview.php?id=27" id="3"&gt;July 17, 2013&lt;/a&gt;
  </code></pre>
  
  <p>I want to display the ID of my link the one i chose and then when i click n 2nd link the id of the second link will display. tahnks</p>