Get the end of string with Javascript
<p>I am storing a string (url) in a variable
it can look like one/two/three/test.aspx?ID=12312
I want to extract the querystring value, not from window.location but from the html</p>

<p>I thought I could use substring and write</p>

<pre><code>var link = ($(this).find('a').attr('href')); 
var qs = link.substring( link.indexOf("="),  text.indexOf(" ") )
</code></pre>

<p>but it returns the string before the = and not after.</p>

<p>What am I doing wrong?
Thanks in advance.</p>
