function GetUrlMenuCode() {
var url = window.location. href;
var parameter = url.substring(url.indexOf('?') 1);
parameter = parameter.split('&');
var reg = /MenuCode=/g;
var menuCode = "";
for (var i = 0; i < parameter.length; i ) {
reg.lastIndex = 0;
if (reg.test(parameter[i] )) {
menuCode = parameter[i].replace("MenuCode=", "");
break;
}
}
return menuCode;
}
The above example shows a parameter named "MenuCode" obtained from the url