使用js获取URL地址栏里面的参数, 获取请求链接参数,函数定义如下
function getUrlRequestParam(name) { var paramUrl = window.location.search.substr(1); var paramStrs = paramUrl.split('&'); var params = {}; for (var index = 0; index < paramStrs.length; index++) { params[paramStrs[index].split('=')[0]] = decodeURI(paramStrs[index].split('=')[1]); } return params[name]; }