function getQueryStringParameter(paramToRetrieve) {
var currentPageUrl = "";
if (typeof this.href === "undefined") {
currentPageUrl =
document.location.toString().toLowerCase();
}
else {
currentPageUrl =
this.href.toString().toLowerCase();
}
if (currentPageUrl != null) {
var params =
document.URL.split("?")[1].split("&");
var strParams =
"";
for (var i = 0; i
< params.length; i = i + 1) {
var singleParam = params[i].split("=");
if (singleParam[0] == paramToRetrieve)
return singleParam[1];
}
}
else {
return
"";
}
}
var pagename=getQueryStringParameter('PageName');
No comments:
Post a Comment