<script>
var url ='https://blog.csdn.net/qq_43735767/article/details/120464187?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522163249347516780274150236%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=163249347516780274150236&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~times_rank-1-120464187.pc_search_ecpm_flag&utm_term=%E5%A6%82%E4%BD%95%E5%B0%86location.search%E8%BD%AC%E5%8C%96%E4%B8%BA%E5%AF%B9%E8%B1%A1&spm=1018.2226.3001.4187#link';
var obj = {};
var arr = url.split('?').pop().split('#').shift().split('&');
console.log(arr);
for(var i = arr.length-1;i>=0;i--){
var k = arr[i].split('=')[0];
var val = arr[i].split('=')[1];
obj[k] = val;
}
console.log(obj);
</script>
输出:
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/37164.html