title: Return value from Javascript to HTML <a href> tag
body: <p>I have html code like this:</p>
  
  <pre><code>&lt;a id="abc_1" name="link_1" href=""
                      onclick="updateLink(this.id);"&gt;Test Link&lt;/a&gt;
  </code></pre>
  
  <p>My Javascript function is like this:</p>
  
  <pre><code>function updateLink(a){ 
   var newurl = document.location.href "+" + a.valueOf();
   return newurl;
  }
  </code></pre>
  
  <p>I want to direct the user to this newurl on click of link.
  How to do it?
  Note: I have seen an example with use of <code>&lt;div&gt;</code> tag, but I need it in <code>&lt;a href&gt;</code> tag.</p>