176142998

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            116 Posts :: 0 Stories :: 45 Comments :: 0 Trackbacks

          <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
          <%@ taglib uri="/struts-tags" prefix="s"%>
          <%
          String path = request.getContextPath();
          String basePath = request.getScheme() + "://"
              + request.getServerName() + ":" + request.getServerPort()
              + path + "/";
          %>

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <html>
          <head>
             <base href="<%=basePath%>">

             <title>Struts 2 標簽之s:property的用法</title>

             <meta http-equiv="pragma" content="no-cache">
             <meta http-equiv="cache-control" content="no-cache">
             <meta http-equiv="expires" content="0">
             <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
             <meta http-equiv="description" content="This is my page">
             <!--
          <link rel="stylesheet" type="text/css" href="styles.css">
          -->

          </head>

          <body>
             <table border="1">
              <tr>
               <th>編號</th>
               <th>書名</th>
               <th>作者</th>
              </tr>
              <s:iterator value="#{'Spring 2.0':'李剛','Java':'張三','j2ee study':'李四'}" id="name" status="st">
               <tr <s:if test="#st.odd">style="background-color:#bbbbbb"</s:if> >
                <td><s:property value="#st.count"/></td>
                <td><s:property value="key"/></td>
                <td><s:property value="value"/></td>
               </tr>
              </s:iterator>
             </table>
          </body>
          </html>
          效果圖:

          posted on 2008-08-04 15:15 飛飛 閱讀(319) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 利辛县| 萨迦县| 介休市| 曲沃县| 灵璧县| 三亚市| 家居| 洪江市| 于田县| 宁强县| 兴文县| 绥宁县| 永春县| 濉溪县| 乌审旗| 卓尼县| 贵定县| 广饶县| 耿马| 武冈市| 桃园市| 南江县| 东城区| 宁陵县| 白银市| 贵溪市| 四会市| 左云县| 兴业县| 阿克| 鹿泉市| 汤阴县| 恩施市| 冷水江市| 容城县| 陇西县| 疏勒县| 武冈市| 福州市| 河北省| 临洮县|