function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var open_id = getUrlParam(‘open_id‘);
标签:cat escape geturl oca arch location open regexp 参数
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var open_id = getUrlParam(‘open_id‘);
标签:cat escape geturl oca arch location open regexp 参数
原文地址:https://www.cnblogs.com/xyc211/p/8597377.html