Get URL parameter values using jquery

Ankaprasad
Posted by Ankaprasad under jQuery category on | Points: 40 | Views : 1506
Browser URL :

http://localhost:37757/CompanyAssesment/CreateContact?isChildWindow=true

The following code will show how to get URL parameter from the browser url


var isChildWin = getParameterByName('isChildWindow');


 function getParameterByName(name) {
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}

Comments or Responses

Login to post response