title: How to get full anchor href?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1550901/how-to-get-raw-href-contents-in-javascript">How to get “raw” href contents in JavaScript</a>  </p>
  </blockquote>
  
  
  
  <p>Sometimes you write in your code relative paths to your files, so in the code the href attribute value could be <code>somefile.php</code> yet when clicking of course the anchor would send you to <code>http://www.yourdomain.com/somefiles.php</code></p>
  
  <p>Now my question is could I somehow obtain the full href of an anchor?</p>
  
  <p>When using <code>$(anchor).attr("href")</code> you only get the relative path.</p>