function getparastr(strname) {
var hrefstr, pos, parastr, para, tempstr;
hrefstr = window.location.href;
pos = hrefstr.indexOf("?");
parastr = hrefstr.substring(pos + 1);
para = parastr.split("&");
tempstr = "";
for ( var i = 0; i < para.length; i++) {
tempstr = para[i];
pos = tempstr.indexOf("=");
if (tempstr.substring(0, pos) == strname) {
return tempstr.substring(pos + 1);
}
}
return null;
}
向html page中路径传值得值的方法
最新推荐文章于 2023-07-25 16:35:00 发布