js获取地址栏参数 //获取地址栏参数,name:参数名称getUrlParms: function getUrlParms(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.href.split("?")[1].match(reg); if (r != null) return unescape(r[2]); return null;}