JS 获取url问号后面的所有参数
var params = (function oneValues() {
var query = location.search.substr(1)
query = query.split('&')
var params = {}
for (let i = 0; i < query.length; i++) {
let q = query[i].split('=')
if (q.length === 2) {
params[q[0]] = q[1]
}
}
return params //返回?号后面的参数名与参数值的数组
}());