//获取URL参数
function getQueryVariable(variable) {
var index;
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
index = i
break
}
}
if (index>=0) {
console.log(index)
return vars[index].split("=")[1];
} else {
return "";
}
}
//跳转页面,并同时获取到url的参数
function face_check() {
window.location.href="face_check.html? deciveId="+getQueryVariable("deciveId")+"&department_id="+getQueryVariable("department_id")
}
获取URL的参数
最新推荐文章于 2022-02-16 16:04:52 发布