function GetQueryString(name){
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null){
var b = decodeURI(r[2]).
replace(/\+/g," ").
replace(/%2B/g,"+").
replace(/%22/g,'"').
replace(/%27/g,"'").
replace(/%2F/g,"/").
replace(/%23/g,"#").
replace(/%3D/g,"=").
replace(/%26/g,"&").
replace(/%40/g,"@").
replace(/%3B/g,";").
replace(/%3F/g,"?").
replace(/%2C/g,",").
replace(/%24/g,"$");
return b
}
return null;
}
相关文章
- 02-26vue获取路由地址栏url里面的指定参数
- 02-26HTTP请求的URL中如何处理特殊字符
- 02-26URL编码与解码:处理URL中有特殊字符导致的异常
- 02-26获取 url 参数
- 02-26freemarker获取url中参数
- 02-26微信小程序传递URL中含有特殊字符
- 02-26JS获取URL中参数值的4种方法
- 02-26js获取url参数值的两种方式
- 02-26js 正则RegExp对象替换url参数值
- 02-26从Url中获取某一参数的参数值