如何使用c:当条件输入标签内的值属性?如何使用c:当条件输入标签内的值属性?
<input id="textid" type="button" value="">
在'价值'。我要的是
<c:when test="${texttest == 'Y'}"> Add </c:when>
<c:otherwise> Edit </c:otherwise>
值应该为 '添加',如果TEXTEST是 'Y',否则 '编辑'
如何使用c:当条件输入标签内的值属性?如何使用c:当条件输入标签内的值属性?
<input id="textid" type="button" value="">
在'价值'。我要的是
<c:when test="${texttest == 'Y'}"> Add </c:when>
<c:otherwise> Edit </c:otherwise>
值应该为 '添加',如果TEXTEST是 'Y',否则 '编辑'
<input id="textid" type="button" value="${texttest == 'Y' ? 'Add' : 'Edit'}">
<c:choose>
<c:when test="${texttest == 'Y'}">
Add
</c:when>
<c:otherwise>
Edit
</c:otherwise>
</c:choose>
谢谢!它确实工作顺利。 – Jignesh 2012-08-17 09:07:05