标签:[1] get func pre UNC decode function geturl turn
1、获取URL中的参数
export function getUrlKey(name) {
return decodeURIComponent((new RegExp(‘[?|&]‘ + name + ‘=‘ + ‘([^&;]+?)(&|#|;|$)‘).exec(location.href) || [, ‘‘])[1].replace(/\+/g, ‘%20‘)) || null
}
标签:[1] get func pre UNC decode function geturl turn
原文地址:https://www.cnblogs.com/chengmingxiaowu/p/9407986.html