function getUrlPar(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var url = decodeURI(decodeURI(window.location.search))
var r = url.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
转载于:https://www.cnblogs.com/n-p-c/p/10191874.html