标签:each sub ram foreach console param span location code
let paramsArray = window.location.search.substr(1).split(‘&‘), i, paramsObj = {}; paramsArray.forEach((item) => { i = item.indexOf(‘=‘); paramsObj[item.slice(0, i)] = item.slice(i+1); }) console.log(paramsObj)
标签:each sub ram foreach console param span location code
原文地址:https://www.cnblogs.com/xjy20170907/p/11022544.html