把js中的if多条件判断修改成jstl中标签判断逻辑拆分的问题!
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/16 11:09:01
把js中的if多条件判断修改成jstl中标签判断逻辑拆分的问题!
if (result[k].answerer = null && ((result[k].initialState == 1 && result[k].hasAudit) || result[k].initialState == 0))){ if (result[k].replyWarningType == 1 || result[k].auditWarningType == 1) { tablestr += ""; } if (result[k].replyWarningType >= 2 || result[k].auditWarningType >= 2) { tablestr += ""; } }因为程序需要要把js中if判断条件转换成在jsp页面使用标签或者来实现判断.如何编写代码才能实现!
if (result[k].answerer = null && ((result[k].initialState == 1 && result[k].hasAudit) || result[k].initialState == 0))){ if (result[k].replyWarningType == 1 || result[k].auditWarningType == 1) { tablestr += ""; } if (result[k].replyWarningType >= 2 || result[k].auditWarningType >= 2) { tablestr += ""; } }因为程序需要要把js中if判断条件转换成在jsp页面使用标签或者来实现判断.如何编写代码才能实现!
<body>
<c:if test="${not empty result[k].answerer and ((result[k].initialState eq 1 and result[k].hasAudit eq true) or result[k].initialState eq 0)}">
<c:choose>
<c:when test="${result[k].replyWarningType eq 1 or result[k].auditWarningType eq 1}">
<!-- 满足条件 -->
</c:when>
<c:otherwise>
<!-- 不满足条件 -->
</c:otherwise>
</c:choose>
</c:if>
</body>
不知道你的k是什么 按js拆过来是这个样子的;eq是==的意思;<c:choose>相当于if else
<c:if test="${not empty result[k].answerer and ((result[k].initialState eq 1 and result[k].hasAudit eq true) or result[k].initialState eq 0)}">
<c:choose>
<c:when test="${result[k].replyWarningType eq 1 or result[k].auditWarningType eq 1}">
<!-- 满足条件 -->
</c:when>
<c:otherwise>
<!-- 不满足条件 -->
</c:otherwise>
</c:choose>
</c:if>
</body>
不知道你的k是什么 按js拆过来是这个样子的;eq是==的意思;<c:choose>相当于if else
把js中的if多条件判断修改成jstl中标签判断逻辑拆分的问题!
关于公务员考试逻辑判断中的判断推理中充分条件和必要条件的区分问题!
jstl中 if的使用,判断集合是否为空的
jstl的if标签如何判断一个集合的大小是否为0
js 多个if else判断的问题,下面是错的 该怎么写呢 如果用elseif也不行 必须用到else
JSTL 如何判断集合size
如何用htmlparser修改html中标签的内容
一个离散数学的逻辑判断问题
关于逻辑判断题的问题.
excel 中的多条件判断用什么样的函数?我共有15个判断条件,但是用IF函数只能用8层函数,
电子表格IF多个条件判断
有关c语言if的问题 如果if语句的判断条件很多,并且判断条件又恰好可以用循环实现,怎样进行处理.