GetRequest() {
var url = window.location.search; //获取url中"?"符后的字串
// var url =
// "?icityfrom=qrcode&app_id=ec495425-7455-466c-987e8d24eac4e31c&code=f7418681-6a2a-42f4-915bfd980a308f99&open id=51757102";
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
var strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
}
return theRequest;
},
获取url问号传参的参数
于 2023-10-24 10:56:57 首次发布