//获取浏览器url参数 var methods ={ getQueryString: function (name) { var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); var r = location.search.substr(1).match(reg); if (r != null) { return unescape(r[2]); } return null; } }; //调用方法:window.…
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 repo…