How to change href of <a> tag on button click through javascript
<p>I want to change the href of <code>&lt;a&gt;</code> tag through javascript on button click.I m not find out any help regard this.Please help me asap.I shall be very thankful to you</p>

<pre><code>       &lt;script type="text/javascript"&gt;
                 function f1()
                   {
                     document.getElementById("abc").href="xyz.php"; 
                   }
       &lt;/script&gt;
             &lt;a href="" id="abc"&gt;jhg&lt;/a&gt;
             &lt;a href="" id="" onclick="f1()"&gt;jhhghj&lt;/a&gt;
</code></pre>
