jsp获取获取后台的数据防范

if ( '${resMap.userExceptionHandling.processingMethod }' == '4' || '${resMap.userExceptionHandling.processingMethod }' == '5' ) {
    $(".autosubmit").hide();
    $(".othersubmit").show();
}

 JS 获取后台的数据加上 ‘’,不然  后台数据为空时,导致  空==‘4’ 报错,加了之后就是 ‘’==‘4’ 

猜你喜欢

转载自blog.csdn.net/weixin_33400820/article/details/82966980