您的位置:首页 > 其它

获取上一页面传递的参数

2018-03-31 13:17 120 查看
var studentId = getQueryString('studentId');
//获取上页面传达的参数
function getQueryString(str) {
var result = window.location.search.match(new RegExp("[\?\&]" + str + "=([^\&]+)", "i"));
if (result == null || result.length < 1) {
return "";
}
return result[1];
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: