Here, I am going to share Javascript code to get the URL querystring parameter values. Let me take a sample URL and try to get the parameter values in it. http://www.techtricky.com?id=77&name=sree Here is the function to create the Javascript object with parameter names and values. function getUrlParams() { var params = {}; window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str,key,value) {