title: Append values into an existing anchor href
body: <p>I have captured 3 values from a datalist template using JavaScript, now I need to append these values into an existing anchor which is:</p>
  
  <pre><code>&lt;a id="link" href='nextpage.aspx?id=&lt;%#Eval("PlateId")%&gt;&amp;pp= #Eval("price")%&gt;'&gt;
  </code></pre>
  
  <p>I found the way to get the anchor href from  JavaScript:  </p>
  
  <pre><code>&lt;script language='javascript' type="text/javascript" &gt;
      function addLink() { 
          var anchor = document.getElementById("link"); 
          anchor.href = anchor + "&amp;qty=";} 
  &lt;/script&gt;
  </code></pre>
  
  <p>But, I can't add the js value after    <code>"&amp;qty="</code>,  I have tried adding the value like this:</p>
  
  <pre><code>anchor.href = anchor +"&amp;qty=+Value+"
  </code></pre>
  
  <p>And with this:</p>
  
  <pre><code>anchor.href = anchor +"&amp;qty='Value' "
  </code></pre>
  
  <p>I can't put it out of the quotation marks, because it won't display in the anchor.</p>