文章
js获取GET链接中参数变量
时间:2024-12-17 11:44
阅读:564
function getParam(name) {
return location.href.match(new RegExp('[?#&]' + name + '=([^?#&]+)', 'i')) ? RegExp.$1 : '';
}