How to form dynamic link in JavaScript?
<p>I would like to form a link on the client end. </p>

<p>I think that need to be urlencoded but i am pretty confused with this. Can some one please help me with this. Is this right?</p>

<pre><code>var link = document.createElement("a");

//addParams function just replaces the 0th and 1th occurrence with values 

a.link = url.addParams(valueO, value1); // url is /home/testpage.aspx?{0}={1}
</code></pre>
