//获取链接参数
function getUrlKey(name) {
return (
decodeURIComponent(
(new RegExp(’[?|&]’ + name + ‘=’ + ‘([^&;]+?)(&|#|;|$)’).exec(
location.href
) || [, ‘’])[1].replace(/+/g, ‘%20’)
) || null
);
};
获取url携带参数的函数封装
最新推荐文章于 2021-11-02 15:10:01 发布