Elegant way of retrieving query string parameter
<p>I am retrieving one query string parameter, and for that my code is </p>

<pre><code> &lt;a href="Default2.aspx?Id=1&amp;status=pending&amp;year=2010"&gt;Click me&lt;/a&gt;
</code></pre>

<p>Now I want to retrieve "status=pending" and for that I am doing </p>

<pre><code> var qString = window.location.search.substring(1);
                  var Keys = qString .split('&amp;');
                 alert(Keys[1]);
</code></pre>

<p>This works fine, but I am hard-coding [1] here. is there any elegent way of doing this without hard-coding?</p>
