1// 获取地址栏参数值2functiongetQueryString(name){3var reg =newRegExp("(^|&)"+ name +"=([^&]*)(&|$)"),4 r = window.location.search.substr(1).match(reg);5if(r !=null)returnunescape(r[2]);6returnnull;7}
1getQueryStr(n){2let r, reg =newRegExp("(^|&)"+ n +"=([^&]*)(&|$)");3 r = window.location.search.substr(1).match(reg);4return r ?decodeURI(r[2]):null;5}