/*** 依据Kind确定跳转到目标列表页面。* @param kind*/function gobackByKind(kind) {var kindStr = String(kind);switch(kindStr){case "1"://跳转到客户列表页面window.location.href='/biz/customer/list';break;case "2"://跳转到代理机构列表页面window.location.href='/biz/agency/list';break;case "3"://跳转到申请人列表页面window.location.href='/biz/applicant/list';break;default://假如URL没有带有参数,//就认为是用户手动在地址栏里输入的URL访问的页面//则直接调用浏览器的返回按钮。history.go(-1);}}
重点:var kindStr = String(kind);
var kind = getBrowserParam('kind'); gobackByKind(kind); gobackByKind(1); gobackByKind('1');
兼容参数类型为Number和String