How To Get Query String Values In JavaScript
We are familiar with getting Query String Values in Asp.Net code behind.
But for getting the Query String Values in Javascript just follow these steps.

By writing down the above code we can get the Query String Values In JavaScript.
function FetchQueryString(regKey)
{
regKey = regKey.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
var regexValue = new RegExp("[\\?&]"+regKey+"=([^&#]*)");
var result = regexValue.exec(window.location.href);
if(result == null)
alert("The parameter is null");
else alert(result[1]);
}