当前位置:网站首页>url转成对象
url转成对象
2022-04-23 06:25:00 【笔描相思】
var strUrl="http:baidu.com/stu/?lx=1&name=aa&sex=man";
var s=strUrl.indexOf('?');
var strs=strUrl.slice(s+1);
var strAry=strs.split('&');
var objs={};
for(var i=0;i<strAry.length;i++){
var item=strAry[i];
var itemAry=item.split('='),
itemAryl=itemAry[0],
itemAryr=itemAry[1];
objs[itemAryl]=itemAryr;
}
版权声明
本文为[笔描相思]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_44788119/article/details/120920772
边栏推荐
猜你喜欢
Solutions to common problems in visualization (VII) solutions to drawing scale setting
SAP pi / PO rfc2restful publishing RFC interface is a restful example (proxy indirect method)
ABAP 从CDS VIEW 发布OData Service示例
SAP PI / Po rfc2restful Publishing RFC interface as restful examples (proxy indirect)
SAP SALV14 后台输出SALV数据可直接保存文件,发送Email(带排序、超链接、筛选格式)
SAP PI/PO rfc2RESTful 发布rfc接口为RESTful示例(Proxy间接法)
Implementation of MySQL persistence
简易随机点名抽奖(js下编写)
int a = 1存放在哪
数论分块(整除分块)
随机推荐
Reflection on the systematic design of Android audio and video caching mechanism
js之预解析
Redis connection error err auth < password > called without any password configured for the default user
Use of typescript dictionary
Authorization+Token+JWT
每日一题 | 曾被反转链表支配的恐惧
5. Sql99 standard: internal connection and external connection
二叉树的深度
10.更新操作
SAP CR传输请求顺序、依赖检查
keytool: command not found
ABAP 实现发布RESTful服务供外部调用示例
Mysql持久性的实现
安装配置淘宝镜像npm(cnpm)
手游的热更方案与动态更新策略
SAP Excel 已完成文件级验证和修复。此工作簿的某些部分可能已被修复或丢弃。
CSDN很火的汤小洋老师全部课程总共有哪些(问号问号问号)
SAP pi / PO rfc2soap publishes RFC interface as WS example
Implementation of MySQL persistence
SAP DEBUG调试FOR IN、REDUCE等复杂的语句