const data = location.search.slice(1).split('&').map(item => {
return item.split('=')
}).reduce((result, item) => {
result[item[0]] = item[1]
return result
}, {})
const data = location.search.slice(1).split('&').map(item => {
return item.split('=')
}).reduce((result, item) => {
result[item[0]] = item[1]
return result
}, {})
本文标题:js截取参数
本文链接:https://www.haomeiwen.com/subject/bgioactx.html
网友评论