 <p>You can use javascript's <code>substr()</code> and <code>.lastIndexOf()</code>:</p> <pre><code>var url = '/Home/LoadData?page=2&amp;activeTab=House'; // window.location.href; var activeTab = url.substr(url.lastIndexOf('=')+1); // outputs House </code></pre> <h3><a href="http://jsfiddle.net/gjkrZ/" rel="nofollow">Find in FIDDLE</a></h3>