第一种:
jsp页面中
<tr >
<td class="td-audit">
<c:if test="${runMalCodeActionForm.auditUserId == -1}">未审核</c:if>
<c:if test="${runMalCodeActionForm.auditUserId != -1 }">已审核</c:if>
</td>
</tr>
<script>
//不可对已审核的记录进行保存和删除的操作
if($.trim($('.td-audit').text()) == "已审核"){
alert("1");
$('#btnImport,#btnSave,#btnDel').attr('disabled',true);
}
</script>
第二种:
<script>
if('${requestScope.runMalCodeActionForm.auditUerId}' !=-1){
$('#btnImport,#btnSave,#btnDel').attr('disabled',true);
}
</script>