使用
var test = getQueryString("test");
js代码
/*获取导航栏参数*/function getQueryString(name) {var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");var r = window.location.search.substr(1).match(reg);if (r != null) return unescape(r[2]);return null;}
时间:2022-08-21 21:25:02
使用
var test = getQueryString("test");
js代码
/*获取导航栏参数*/function getQueryString(name) {var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");var r = window.location.search.substr(1).match(reg);if (r != null) return unescape(r[2]);return null;}