How can I add "href" attribute to a link dynamically using javascript?
<p>Hey guys. Just like in the title - is there any way of doing this? I basically want to add a href attribute to  dynamically (i.e. when user click on specific image in the website). </p>

<p>So from:</p>

<pre><code>&lt;a&gt;Link&lt;/a&gt;
</code></pre>

<p>I need to go to:</p>

<pre><code>&lt;a href="somelink url"&gt;Link&lt;/a&gt;
</code></pre>

<p>I haven't done javascript for a while so please bear with me. Thanks for any replies.</p>
