当前位置:网站首页>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
边栏推荐
- Educational Codeforces Round 81 (Rated for Div. 2)
- MySQL index
- 6. Aggregation function and grouping statistics
- 数据分析入门 | kaggle泰坦尼克任务(四)—>数据清洗及特征处理
- SAP pi / PO rfc2soap publishes RFC interface as WS example
- Learn to use search engines
- 积性函数与迪利克雷卷积
- Date对象(js内置对象)
- [LNOI2014]LCA——树链剖分——多点LCA深度和问题
- SAP 导出Excel文件打开显示:“xxx“的文件格式和扩展名不匹配。文件可能已损坏或不安全。除非您信任其来源,否则请勿打开。是否仍要打开它?
猜你喜欢
随机推荐
Mvcc (multi version concurrency control)
12. Constraints
Preliminary configuration of OpenGL super Dictionary (freeglut, glew, gltools, GLUT)
int a = 1存放在哪
Applet newline character \ nfailure problem resolution - Daily pit stepping
SAP TRANSLATE使用数据对象掩码示例
ABAP 从CDS VIEW 发布OData Service示例
SAP SALV14 后台输出SALV数据可直接保存文件,发送Email(带排序、超链接、筛选格式)
js之自定义属性以及H5中如何判断自定义属性
Use of typescript dictionary
SAP pi / PO rfc2soap publishes RFC interface as WS example
How to judge whether a point is within a polygon (including complex polygons or a large number of polygons)
[牛客挑战赛47]C.条件 (bitset加速floyd)
[self motivation series] what really hinders you?
SAP PI/PO rfc2RESTful 发布rfc接口为RESTful示例(Proxy间接法)
10. Update operation
keytool: command not found
Implementation of MySQL persistence
游戏辅助脚本开发之旅
SAP ECC连接SAP PI系统配置

![[Educational Codeforces Round 80] 解题报告](/img/54/2fd298ddce3cd3e28a8fe42b3b8a42.png)







