function GetLocationParam(param){ //获取页面参数 var request = { QueryString : function(val) { var uri = window.location.search; var re = new RegExp("" +val+ "=([^&?]*)", "ig"); return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null); } } return request.QueryString(param); }js中就可以这样调用如URL为http://www.itlearner.com/test.htm?name=hxvar name=...