获取url?后参数等值

getUrlParameter (param, dummyPath) {
let sPageURL =
window.location.hash || window.location.search.substring(1)
// console.log(sPageURL)
let sURLVariables = sPageURL.split(/[&||?]/)
// console.log(sURLVariables)
let res = ‘‘
for (let i = 0; i < sURLVariables.length; i += 1) {
let paramName = sURLVariables[i]
let sParameterName = (paramName || ‘‘).split(‘=‘)
// console.log(sParameterName)
if (sParameterName[0] === param) {
res = sParameterName[1]
}
}
return res
},

获取url?后参数等值

上一篇:mysql binlog数据恢复


下一篇:.NET 表达式计算:Expression Evaluator