title: Difference between this.href and $(this).attr("href")
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6977049/this-href-vs-this-attrhref">this.href vs $(this).attr(&#39;href&#39;)</a>  </p>
  </blockquote>
  
  
  
  <p>Here is my code:</p>
  
  <pre><code> $(function () {
          $("a.Delete").click(function () {
              console.log(this.href);
              console.log($(this).attr("href"));
              return false;
          });
  </code></pre>
  
  <p>and here is my link</p>
  
  <pre><code>&lt;a class="Delete" href="/Contact/Delete/10402"&gt;Delete&lt;/a&gt;
  </code></pre>
  
  <p>Here is my output:</p>
  
  <pre><code>http://localhost:59485/Contact/Delete/10402
  /Contact/Delete/10402
  </code></pre>
  
  <p>Why the difference doesn't the attr method just get the attribute. Isn't that what this.href does? Is the href property special in some way that it actually gives you the absolute url?</p>