function getUrlStr(name, url) {
const _url = url || window.location
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
function getUrlStr(name, url) {
const _url = url || window.location
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
本文标题:读取url携带的参数
本文链接:https://www.haomeiwen.com/subject/jzzdbktx.html
网友评论