javascript代码库

来源:互联网 发布:听说科技软件 编辑:程序博客网 时间:2024/06/05 17:13
//解析URL参数,直接替换成json格式的对象JSON.parse(decodeURI((location.search.replace(/^\?/g,'{"').replace(/\&/g,'","').replace(/\=/g, '":"')||'{"":"')+'"}'))