function GetQueryString(name) {
const reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`, 'i');
const i = window.location.href.indexOf('?');
const r = window.location.href.substr(i).substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}

调用 GetQueryString(id)

posted on 2019-12-06 14:14  效率的九尾  阅读(100)  评论(0编辑  收藏  举报