亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

?怎么用JSTL替換其中的JSP腳本元素?

?怎么用JSTL替換其中的JSP腳本元素?

erutdioup8556 2016-03-20 12:29:16
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><html><head><meta charset="utf-8"><title>Simplicity</title></head><body>? <img src="image/xplogo.gif">? <ul>? ? <%? ? ? ? int loop = 1; // 默認值? ? ? ? String loopStr = request.getParameter("loop");? ? ? ? // 判斷loopStr是否為空? ? ? ? if (loopStr != null && loopStr.length() > 0) {? ? ? ? ? ? loop = Integer.valueOf(loopStr);? ? ? ? }? ? %> ?? ? <%-- Simple comment at server side --%>? ? <!-- Simple comment at client side -->? ??? ??? ? <%? ? ? ? for (int x = 0; x < loop; x++) {? ? %>? ?? ? <li><h2>Do the simplest thing that could possibly work.</h2></li>? ? <li><h2>You Aren't Going to Need It. [YAGNI]</h2></li>? ? <%? ? ? ? }? ? %>? </ul>? <%--!String userName = "Kent Beck"; --%>? <%? ? ? String name = "Kent Beck";? %>? <%=name%></body></html>
查看完整描述

3 回答

?
假面騎士真理

TA貢獻5條經驗 獲得超0個贊

自己去學jstl的標簽就知道它的作用了

查看完整回答
反對 回復 2016-03-22
?
妖精づ凱文

TA貢獻5條經驗 獲得超0個贊

自定義標簽技術,你去學一下吧

查看完整回答
反對 回復 2016-03-21
  • 3 回答
  • 0 關注
  • 2112 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號