JavaScript 当前URL取参返回字典

getParam : function(){
return (key, strURL = window.location.search) => new RegExp("(^|\?|&)" + key + "=([^&]*)(\s|&|$)", "i").test(strURL) ?
decodeURIComponent(RegExp.$2.replace(/+/g, " ")) : "";
},
原文地址:https://www.cnblogs.com/luorende/p/10214826.html