const q = {};
location.search.replace(/([^?&=]+)=([^&]+)/g,(_,k,v)=>q[k]=v);
console.log(q);
const q = {};
location.search.replace(/([^?&=]+)=([^&]+)/g,(_,k,v)=>q[k]=v);
console.log(q);
本文标题:获取get参数正则方法
本文链接:https://www.haomeiwen.com/subject/mmkwgktx.html
网友评论