
说好的IE11兼容javascript中的常量类型 const 呢 ?可能并没有完全兼容
项目中遇到一个问题,采用google浏览器访问没问题,在本地jetty启动,IE11也可以正常访问,然而当我将项目打成WAR包,放到server(linux环境)上时,
报错如下:
console
debugger
代码如下:
function equitySecTypeHandler(form, secType) { // error here
const COMMON_STOCK = "Common Stocks";
const SHARES_ETF = "Listed shares / ETF without complex features"; var prdRiskRating = form.getValue('prdRiskRating');
var complexPrd = form.getValue('complexPrd');
var derivatives = form.getValue('derivatives');
var sfcSpecifiedJuris = form.getValue('sfcSpecifiedJuris');
var piPrdFlag = form.getValue('piPrdFlag');
var prdClassification = form.getValue('prdClassification');
var equitySecType = form.getValue('equitySecType'); clearExtraTab(form);
var returnBean = new Object();
if(secType == null) {
return returnBean;
} if(equitySecTypeMap[equitySecType] == COMMON_STOCK) {
returnBean.complexPrd = 'N';
returnBean.derivatives = 'N';
for(var key in prdClassificationMap){
if(prdClassificationMap[key] == SHARES_ETF) {
returnBean.prdClassification = key;
break;
}
}
returnBean.piPrdFlag = 'N';
}
return returnBean;
}
注释掉const语句,问题解决