getRequestParams:function(param){
var reg = new RegExp("(^|&)" + param + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); returnnull;
}
使用方法:
var reportName = this.getRequestParams("reportName");
console.log(reportName);
原文地址:https://www.cnblogs.com/xyhero/p/9404427.html
时间: 2024-11-09 03:22:13