//获取地址栏参数
const getQueryString = (name) => {
return decodeURIComponent((new RegExp(’[?|&]’ + name + ‘=’ + ‘([^&;]+?)(&|#|;|$)’).exec(location.href) || [, “”])[1].replace(/+/g, ‘%20’)) || null
}
获取地址栏参数
最新推荐文章于 2022-03-16 10:56:44 发布
//获取地址栏参数
const getQueryString = (name) => {
return decodeURIComponent((new RegExp(’[?|&]’ + name + ‘=’ + ‘([^&;]+?)(&|#|;|$)’).exec(location.href) || [, “”])[1].replace(/+/g, ‘%20’)) || null
}