这里写自定义目录标题
两个html页面传多个参数 另一个页面如何获取
传参页 : href= url+“?参数名1=参数1&&……”
获取参数也直接将下面代码复制,调用
//接收页面传值方法
var 参数1 = function getParam(参数名1) {
paramValue = "", isFound = !1;
if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
/获取url中"?"符后的字串,使用了两次decodeRUI解码,解决中文乱码问题
var url =decodeURI(decodeURI(location.search)); /
arrSource = unescape(url).substring(1, url.length).split("&"), i = 0;
while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
}
return paramValue == "" && (paramValue = null), paramValue
}