title: function in HREF not working using javascript
body: <p>I have function which needs to be run on click event. However it is working fine with onclick attribute of anchor tag but not working with HREF attribute. It is giving id undefined. Here is demo code</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;a href="javascript:test(this)" id="first"&gt;click&lt;/a&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>function test(obj){
  alert(obj.id)
  }
  </code></pre>