首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

<C:choose>

2012-08-22 
C:choosec:choose 操作的语法 c:choosec:when testexpressionbody content/c:whenc:when te

<C:choose>
<c:choose> 操作的语法
<c:choose>
  <c:when test="expression">
        body content
  </c:when>
  <c:when test="expression">
        body content
  </c:when>
  ...
  <c:otherwise>
        body content
  </c:otherwise>
</c:choose>

注意:每个要测试的条件都由相应的 <c:when> 标记来表示,至少要有一个 <c:when> 标记。只会处理第一个其 test 值为 true 的 <c:when> 标记体内的内容。如果没有一个 <c:when> 测试返回 true ,那么会处理 <c:otherwise> 标记的主体内容。注:尽管如此, <c:otherwise> 标记却是可选的; <c:choose> 标记至多可有一个嵌套的 <c:otherwise> 标记

热点排行