获取url参数值,记录一下方便以后用到
// 获取url参数 const getUrlKey = name => { return decodeURIComponent((new RegExp(‘[?|&]‘ + name + ‘=‘ + ‘([^&;]+?)(&|#|;|$)‘).exec(location.href) || [, ""])[1].replace(/\+/g, ‘%20‘)) || null };
原文地址:https://www.cnblogs.com/double405/p/11445898.html
时间: 2024-10-29 11:41:48