function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
};
getQueryString(name) //需要获取什么参数 就填写即可
方法二
//window.location.href信息
utl=http://101.231.114.212:10002/pifa/index.html?randomStr=a094014c7d2b8f6895f461123bb8901b&tokenStr=4aba86127bb54677a3d9ac2dd5345bff&mchntOrderId=3479090878634&transAt=1&version=2.0.0&sign=LYEsaji8bQChXtMMp+mJV6v+JQUDCWSeHwHAEilAMYt/FoB+aU1nHyuFcNCaufB7
直接将参数存本地
var keyWords=utl.split("?")[1].split("&");for(var i=0;i<keyWords.length;i++){if(keyWords[i].indexOf('=')!=-1){
sessionStorage.setItem(keyWords[i].split('=')[0],keyWords[i].split('=')[1])}}
获取url传参function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != n...