js获取地址栏参数
来源:互联网 发布:长沙软件开发公司 编辑:程序博客网 时间:2024/05/02 01:58
var Request = new Object();
Request = getRequest();
var wx_id = Request['wx_id'];//订单产品信息
wx_id = wx_id.replace(/\s*/ig,'');//去掉字符串的所有空格
//js获取url参数值
function getRequest(){
var url = decodeURI(location.search);//获取url中"?"符后的字串
var theRequest = new Object();
if(url.indexOf('?') != -1){
var str = url.substr(1);
strs = str.split('&');
for(var i=0; i < strs.length; i++){
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
Request = getRequest();
var wx_id = Request['wx_id'];//订单产品信息
wx_id = wx_id.replace(/\s*/ig,'');//去掉字符串的所有空格
//js获取url参数值
function getRequest(){
var url = decodeURI(location.search);//获取url中"?"符后的字串
var theRequest = new Object();
if(url.indexOf('?') != -1){
var str = url.substr(1);
strs = str.split('&');
for(var i=0; i < strs.length; i++){
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
return theRequest;
}
0 0
- js 获取地址栏参数
- js获取地址栏参数
- js 获取地址栏参数
- JS获取地址栏参数
- JS获取地址栏参数
- js获取地址栏参数
- js获取地址栏参数
- js 获取地址栏参数
- js获取地址栏参数
- js获取地址栏参数
- JS获取地址栏参数
- js 获取地址栏参数
- js获取地址栏参数
- js获取地址栏参数
- js获取地址栏参数
- js获取地址栏参数
- js获取地址栏参数
- js获取地址栏参数
- SAX
- windows下ACE怎样安装与使用说明?
- Java线程(七):Callable和Future
- NYOJ 762 第k个互质数(二分 + 容斥)
- 【Linux学习笔记】Linux动态共享对象(动态链接库)装载过程
- js获取地址栏参数
- sql总结
- android Notification 的使用
- C#直接调用webBrowser JavaScript
- Java线程(八):锁对象Lock-同步问题更完美的处理方式
- php 分页类 非常好用
- MFC 的窗口刷新接口
- 《Velocity用户手册》-第六章
- POJ 1009 c++