如何使用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