title: Javascript : this.getAttribute("href") not working
body: <p>I using javascript in js file like this:</p>
  
  <pre><code>document.body.onclick = function(ev) {
      alert(this.getAttribute("href"));
  };
  </code></pre>
  
  <p>but that code gave me <code>null</code>.</p>
  
  <p>I don't want using <code>jQuery</code>. for example <code>$(this).attr('href');</code></p>
  
  <p>Do you got any better suggest? I want get last <code>href</code> when user click on any <code>&lt;a&gt;</code> tags. </p>