1、
//匹配地址栏中name的参数值
function getQueryString(name) {
var result = window.location.search.match(new RegExp("[?&]" + name + “=([^&]+)”, “i”));
if (result == null || result.length < 1) {
return “”;
}
return result[1];
}
正则表达式笔记
最新推荐文章于 2025-08-15 22:44:18 发布