获取地址栏URL的属性
1 // alert(getQueryString('departmentName')); 2 3 function getQueryString(name) { 4 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 5 var r = window.location.search.substr(1).match(reg); 6 if (r != null) return decodeURI(r[2]); 7 return null; 8 }