javascript - 将url后的参数键值对转换成JSON数组格式效率最高的方法?
巴扎黑
巴扎黑 2017-04-11 10:12:38
0
5
693


http: //www.a.com/admin/index.php#route=main/nav&user=tom&id=123/profile

后的参数转换成:

    [
    {"router":"main"},
    {
    "nav":"",
    "user":"tom",
    "id":"123"
    },
    {"profile":""}
    ]

除了循环变量有没有更简洁的方法

巴扎黑
巴扎黑

reply all(1)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!