关于<c:if没有<:else解决方案
来源:互联网 发布:著名软件培训学校 编辑:程序博客网 时间:2024/05/21 06:28
jstl的c标签总结:http://blog.sina.com.cn/s/blog_4550f3ca010143lb.html
下面是c:choose的用法:
<c:if>没有<c:else>可以用<c:choose>来取代结构:<c:choose> <c:when test=""> 如果 </c:when> <c:otherwise> 否则 </c:otherwise></c:choose>在同一个 <c:choose> 中,当所有 <c:when> 的条件都没有成立时,则执行 <c:otherwise> 的本体内容。 语法 <c:otherwise> 本体内容 </c:otherwise> 属性 无 限制 ·<c:otherwise> 必须在 <c:choose> 和 </c:choose>之间 ·在同一个 <c:choose> 中时,<c:otherwise> 必须为最后一个标签 说明 在同一个 <c:choose> 中,假若所有 <c:when> 的test属性都不为true时,则执行 <c:otherwise> 的本体内容。 范例 笔者举一个典型的 <c:choose>、<c:when>和<c:otherwise>范例: <c:choose> <c:when test="${condition1}"> condition1为true </c:when> <c:when test="${ condition2}"> condition2为true </c:when> <c:otherwise> condition1和condition2都为false </c:otherwise> </c:choose> 范例说明:当condition1为true时,会显示“condition1为true”;当condition1为false且condition2为true时,会显示“condition2为true”,如果两者都为false,则会显示“condition1和condition2都为false”。 注意 假若condition1和condition2两者都为true时,此时只会显示"condition1为true",这是因为在同一个<c:choose>下,当有好几个<c:when>都符合条件时,只能有一个<c:when>成立。
0 0
- 关于<c:if>没有<c:else>解决方案
- 关于<c:if>没有<c:else>解决方案
- 关于<c:if>没有<c:else>解决方案
- 关于<c:if>没有<c:else>解决方案
- 关于<:if>没有<c:else>解决方案
- 关于<c:if没有<:else解决方案
- 关于<:if>没有<c:else>解决方案
- 10027---关于<:if>没有<c:else>解决方案
- 关于<:if>没有<c:else>解决方案
- 关于<:if>没有<c:else>解决方案
- <:if>没有<c:else>解决方案
- 关于jsp EL表达式<c:if>没有<c:else>解决方案
- <c:if>没有<c:else>解决方案
- <c:if>没有else
- <c:if>没有<c:else>解决办法
- JSTL中解决c:if没有else
- 关于<:if>没有<c:else> 可以用<c:choose>来取代结构:
- if else 另外解决方案
- MyReport报表系统(一)
- C++中的隐藏、重载、覆盖(重写)
- 初识linux(八)--bash shell 的功能
- LoadRunner
- 为iPhone 6设计自适应布局
- 关于<c:if没有<:else解决方案
- hibernate 核心接口和可扩展点
- 第十六周oj--逆序输出数组
- 第16周项目--用指针数组排序
- 第十六周项目四:为动态数组扩容
- HttpURLConnection学习
- EMMC 发展
- direct io/buffer io
- Android -- 经验分享