Hi All,
Here is quick way to get query string value in javascript:
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
Use this function to get the value of any value present in query string.
var Id = getParameterByName("Id");
Happy Coding....
0 Comment(s)