Well my previous blog was on how to replace parameters in query string of a uri, this one simply gets the param value from the url..
function getParameterByName(uri,paramName) {
paramName = paramName.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + paramName + "=([^&#]*)"),
results = regex.exec(uri);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
Jquery is not required for it...
0 Comment(s)