1
2
3
4
5
6
7
8
//获取地址栏参数,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;
}