亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

direktori cari
JSP 基礎(chǔ)教程 JSP 開(kāi)發(fā)環(huán)境搭建 JSP 結(jié)構(gòu) JSP 生命周期 JSP 語(yǔ)法 JSP 指令 JSP 動(dòng)作元素 JSP 隱式對(duì)象 JSP 客戶端請(qǐng)求 JSP 服務(wù)器響應(yīng) JSP HTTP 狀態(tài)碼 JSP 表單處理 JSP 過(guò)濾器 JSP Cookies 處理 JSP Session JSP 文件上傳 JSP 日期處理 JSP 頁(yè)面重定向 JSP 點(diǎn)擊量統(tǒng)計(jì) JSP 自動(dòng)刷新 JSP 發(fā)送郵件 JSP 高級(jí)教程 JSP 標(biāo)準(zhǔn)標(biāo)簽庫(kù)(JSTL) <c:out> 標(biāo)簽 <c:set> 標(biāo)簽 <c:remove> 標(biāo)簽 <c:catch> 標(biāo)簽 <c:if> 標(biāo)簽 <c:choose> <c:import> 標(biāo)簽 <c:forEach> <c:param> 標(biāo)簽 <c:redirect> 標(biāo)簽 <fmt:formatNumber>標(biāo)簽 <fmt:parseNumber> 標(biāo)簽 <fmt:formatDate> 標(biāo)簽 <fmt:parseDate> 標(biāo)簽 <fmt:bundle> 標(biāo)簽 <fmt:setLocale> 標(biāo)簽 <fmt:setBundle> 標(biāo)簽 <fmt:timeZone> 標(biāo)簽 <fmt:setTimeZone> 標(biāo)簽 <fmt:message> 標(biāo)簽 <fmt:requestEncoding> 標(biāo)簽 <sql:setDataSource> 標(biāo)簽 <sql:query> 標(biāo)簽 <sql:update> 標(biāo)簽 <sql:param> 標(biāo)簽 <sql:dateParam> 標(biāo)簽 <sql:transaction> 標(biāo)簽 <x:out> 標(biāo)簽 <x:parse> 標(biāo)簽 <x:set> 標(biāo)簽 <x:if> 標(biāo)簽 <x:forEach> 標(biāo)簽 <x:choose> <x:transform> 標(biāo)簽 <x:param> 標(biāo)簽 fn:contains()函數(shù) fn:containsIgnoreCase()函數(shù) fn:endsWith()函數(shù) fn:escapeXml()函數(shù) fn:indexOf()函數(shù) fn:join()函數(shù) fn:length()函數(shù) fn:replace()函數(shù) fn:split()函數(shù) fn:startsWith()函數(shù) fn:substring()函數(shù) fn:substringAfter()函數(shù) fn:substringBefore()函數(shù) fn:toLowerCase()函數(shù) fn:toUpperCase()函數(shù) fn:trim()函數(shù) JSP 連接數(shù)據(jù)庫(kù) JSP XML 數(shù)據(jù)處理 JSP JavaBean JSP 自定義標(biāo)簽 JSP 表達(dá)式語(yǔ)言 JSP 異常處理 JSP 調(diào)試 JSP 國(guó)際化
watak

<x:choose>, <x:when>, <x:otherwise> 標(biāo)簽


<x:choose>標(biāo)簽與Java switch語(yǔ)句有相同的功能。switch語(yǔ)句有case語(yǔ)句,而<x:choose>標(biāo)簽有<x:when>標(biāo)簽。switch語(yǔ)句有default語(yǔ)句,而<x:choose>標(biāo)簽有<x:otherwise>標(biāo)簽。


屬性

  • <x:choose>沒(méi)有屬性。
  • <x:when>的屬性在下表中給出。
  • <x:otherwise>沒(méi)有屬性。

<x:when>標(biāo)簽的屬性:

屬性 描述 是否必要 默認(rèn)值
select 條件 無(wú)
?

實(shí)例演示

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<html>
<head>
  <title>JSTL x:choose 標(biāo)簽</title>
</head>
<body>
<h3>Books Info:</h3>

<c:set var="xmltext">
  <books>
    <book>
      <name>Padam History</name>
      <author>ZARA</author>
      <price>100</price>
    </book>
    <book>
      <name>Great Mistry</name>
      <author>NUHA</author>
      <price>2000</price>
    </book>
  </books>
</c:set>

<x:parse xml="${xmltext}" var="output"/>
<x:choose>
   <x:when select="$output//book/author = 'ZARA'">
      Book is written by ZARA
   </x:when>
   <x:when select="$output//book/author = 'NUHA'">
      Book is written by NUHA
   </x:when>
   <x:otherwise>
      Unknown author.
   </x:otherwise>
</x:choose>

</body>
</html>

運(yùn)行結(jié)果如下:

BOOKS INFO:
Book is written by ZARA

關(guān)于我們 聯(lián)系我們 留言板

手冊(cè)網(wǎng)

Artikel sebelumnya: Artikel seterusnya: