JavaWeb项目开发案例精粹-第2章投票系统-006view层

1.index.jsp

  1 <%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
  2 <%@ taglib prefix="s" uri="/struts-tags" %>
  3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  4 <html>
  5   <head>
  6     <title>体育赛事投票系统</title>
  7     <LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
  8     <style type="text/css">
  9     <!--
 10     .STYLE14 {color: #FF0000}
 11     .STYLE15 {font-family: tahoma; font-size: 11px;}
 12     .STYLE17 {color: #003300}
 13     -->
 14     </style>
 15   </head>
 16   
 17   <body>
 18      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
 19       <tr>
 20         <td>&nbsp;</td>
 21         <td width="642" align="left" valign="top"><table width="642"  border="0" cellspacing="0" cellpadding="0">
 22           <tr>
 23             <td height="37" align="left" valign="top" background="images/menu.jpg">
 24                 <!--导航栏-->
 25                 <div style="padding-left:42px; padding-top:10px">
 26                     <a href="showVoteByChannel.action?channelID=1" class="style2" style="text-decoration:none ">NBA</a>
 27                     <img src="images/spacer.gif" width="74" height="1">
 28                     <a href="showVoteByChannel.action?channelID=2" class="style2" style="text-decoration:none ">CBA</a>
 29                     <img src="images/spacer.gif" width="55" height="1">
 30                     <a href="showVoteByChannel.action?channelID=3" class="style2" style="text-decoration:none ">足球世界杯</a>
 31                     <img src="images/spacer.gif" width="33" height="1">
 32                     <a href="showVoteByChannel.action?channelID=4" class="style2" style="text-decoration:none ">中超</a>
 33                     <img src="images/spacer.gif" width="68" height="1">
 34                     <a href="showVoteByChannel.action?channelID=5" class="style2" style="text-decoration:none ">英超</a>
 35                     <img src="images/spacer.gif" width="64" height="1">
 36                     <a href="showVoteByChannel.action?channelID=6" class="style2" style="text-decoration:none ">F1</a>
 37                 </div>
 38             </td>
 39           </tr>
 40           <tr>
 41             <td align="left" valign="top"><table width="642"  border="0" cellspacing="0" cellpadding="0">
 42               <tr align="left" valign="top">
 43                 <td width="427" height="100%" align="right"><table width="426" height="100%"  border="0" cellpadding="0" cellspacing="0">
 44                   <tr>
 45                     <td align="left" valign="top"><table width="426"  border="0" cellpadding="0" cellspacing="0" background="images/line_1.jpg">
 46                       <tr>
 47                         <td height="22" align="left" valign="middle" background="images/kattle_1.jpg" class="style2">&nbsp;&nbsp;最新投票</td>
 48                       </tr>
 49                       <tr>
 50                         <td height="518" align="left" valign="top"><div style="padding-left:18px; padding-top:16px; padding-bottom:20px">
 51                          <s:actionerror/>
 52                          <s:iterator value="#request.voteResultList" var="voteResult">
 53                              <p class="style2">${voteResult.vote.voteName}</p>
 54                               <form action="doVote.action" method="post">
 55                               <p class="style2">
 56                              <s:iterator value="#voteResult.voteOptions" var="voteOption">
 57                                  <input type="radio" name="voteOptionID" value="${voteOption.voteOptionID}">${voteOption.voteOptionName}<br>
 58                              </s:iterator>
 59                                  <input type="radio" name="voteOptionID" value="0">其它<br>
 60                                  <input type="text" name="otherOption">
 61                                  <input type="hidden" name="voteID" value="${voteResult.vote.voteID}">
 62                                  <input type="hidden" name="channelID" value="${voteResult.vote.channelID}">
 63                                  <a href="voteResult?voteID=${voteResult.vote.voteID}">查看投票结果</a>
 64                              </p>
 65                              <p>
 66                             <input type="submit" value="投票">
 67                             <input type="reset" value="重置">
 68                             </p>
 69                             </form>
 70                          </s:iterator>
 71                          <s:if test="#request.voteResultList.size == 0">
 72                              没有任何投票内容!
 73                          </s:if>
 74                         </div>
 75                         <div align="center" style="font-size: 12px">
 76                             <s:if test="#request.page.hasPrePage">
 77                                 <a href="showVoteByChannel?channelID=${channelID}&&currentPage=1">首页</a> | 
 78                                 <a href="showVoteByChannel?channelID=${channelID}&&currentPage=${page.currentPage -1 }">上一页</a>
 79                             </s:if>
 80                             <s:else>
 81                                 首页 | 上一页
 82                             </s:else>
 83                             <s:if test="#request.page.hasNextPage">
 84                                 <a href="showVoteByChannel?channelID=${channelID}&&currentPage=${page.currentPage + 1 }">下一页</a> | 
 85                                 <a href="showVoteByChannel?channelID=${channelID}&&currentPage=${page.totalPage }">尾页</a>
 86                             </s:if>
 87                             <s:else>
 88                                 下一页 | 尾页
 89                             </s:else>
 90                         </div>    
 91                          </td>
 92                       </tr>
 93                       <tr>
 94                         <td align="left" valign="top"><img src="images/kettle_2.jpg" width="426" height="2"></td>
 95                       </tr>
 96                     </table></td>
 97                   </tr>
 98                 </table></td>
 99                 <td width="215" height="100%" align="right"><table width="203" height="100%"  border="0" cellpadding="0" cellspacing="0">
100                   <tr>
101                     <td align="left" valign="top"><table width="203" height="613"  border="0" cellpadding="0" cellspacing="0" background="images/line_3.jpg">
102                       <tr>
103                         <td height="22" align="left" valign="middle" background="images/kettle_5.jpg" class="style9 STYLE14">&nbsp;<span class="STYLE15">&nbsp;<span class="STYLE17">热门投票</span></span></td>
104                       </tr>
105                       <tr>
106                         <td align="left" valign="top"><div style="padding-left:19px; padding-top:14px; padding-bottom:10px"></div>
107                           <ol>
108                             <li class="style7">你最喜欢的NBA球员</li>
109                             <li class="style7">你最喜欢的NBA中锋</li>
110                           </ol></td>
111                       </tr>
112                       <tr>
113                         <td height="2" align="left" valign="top"><img src="images/bot_1.jpg" width="203" height="2"></td>
114                       </tr>
115                     </table></td>
116                   </tr>
117                   <tr>
118                     <td height="11" align="left" valign="top"><img src="images/spacer.gif" width="1" height="11"></td>
119                   </tr>
120                 </table></td>
121               </tr>
122             </table></td>
123           </tr>
124           <tr>
125             <td height="12" align="left" valign="top"><img src="images/spacer.gif" width="1" height="12"></td>
126           </tr>
127           <tr>
128             <td align="left" valign="top" background="images/rep_1.jpg" style="background-repeat:repeat-x; background-position:top left "><div align="center" style="padding-top:14px"></div>
129               <div style="padding-left:5px; padding-top:3px">
130                 <div align="center" class="style8">体育赛事投票系统 &copy;2009-2010 </div>
131               </div></td>
132           </tr>
133         </table></td>
134         <td>&nbsp;</td>
135       </tr>
136       <tr>
137         <td>&nbsp;</td>
138         <td width="642" align="left" valign="top">&nbsp;</td>
139         <td>&nbsp;</td>
140       </tr>
141     </table>
142   </body>
143 </html>

 

2.admin/addVote.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
 3 <html xmlns="http://www.w3.org/1999/xhtml">
 4 <head>
 5 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 6 <title>新增投票</title>
 7     <script type="text/javascript" language="javascript">
 8         var i = 4;
 9         function addVoteOption(){
10             var voteP = document.getElementById("voteOptionList");
11             var inputText = document.createTextNode("选项" + (i++) +"名称:");
12             voteP.appendChild(inputText);
13             var inputP = document.createElement("input");
14             inputP.type="text";
15             inputP.name="voteOption";
16             voteP.appendChild(inputP);
17             var brP = document.createElement("<br>");
18             voteP.appendChild(brP);
19         }
20     </script>
21 </head>
22 <body>
23     <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
24   <tr>
25     <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
26       <tr>
27         <td width="15" height="30"><img src="images/tab_03.gif" width="15" height="30" /></td>
28         <td width="1101" background="images/tab_05.gif"><img src="images/311.gif" width="16" height="16" /> <span style="font-size: 12px">新增投票</span></td>
29         <td width="281" background="images/tab_05.gif"></td>
30         <td width="14"><img src="images/tab_07.gif" width="14" height="30" /></td>
31       </tr>
32     </table></td>
33   </tr>
34   <tr>
35     <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
36       <tr>
37         <td width="9" background="images/tab_12.gif">&nbsp;</td>
38         <td bgcolor="#f3ffe3">
39         <div style="padding-left: 100px;padding-top: 10px;font-size: 12px">
40                <form action="addVote.action" method="post" name="addForm">
41               选择投票频道:<select name="channel">
42                   <option value="1">NBA</option>
43                   <option value="2">CBA</option>
44                   <option value="3">足球世界杯</option>
45                   <option value="4">中超</option>
46                   <option value="5">英超</option>
47                   <option value="6">F1</option>
48               </select><br/>
49               请输入投票名称:<input type="text" name="voteName"/><br/>
50               <div id="voteOptionList">
51               选项1名称:<input type="text" name="voteOption"/><br/>
52               选项2名称:<input type="text" name="voteOption"/><br/>
53               选项3名称:<input type="text" name="voteOption"/><br/>
54               </div>
55               <input type="button" value="新增投票选项" onclick="addVoteOption()"/>
56               <input type="submit" value="发布"/>
57               <input type="reset" value="重置"/>
58           </form>
59           </div>
60       </td>
61         <td width="9" background="images/tab_16.gif">&nbsp;</td>
62       </tr>
63     </table></td>
64   </tr>
65   <tr>
66     <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
67       <tr>
68         <td width="15" height="29"><img src="images/tab_20.gif" width="15" height="29" /></td>
69         <td background="images/tab_21.gif">&nbsp;</td>
70         <td width="14"><img src="images/tab_22.gif" width="14" height="29" /></td>
71       </tr>
72     </table></td>
73   </tr>
74 </table>
75 </body>
76 </html>

 

3.admin/index.jsp

 1 <%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
 3 <html xmlns="http://www.w3.org/1999/xhtml">
 4 <head>
 5 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 6 <title>投票系统后台管理</title>
 7 </head>
 8 
 9 <frameset rows="10,*,24" cols="*" framespacing="0" frameborder="no" border="0">
10   <frame src="top.html" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" />
11   <frame src="center.html" name="mainFrame" id="mainFrame" />
12   <frame src="down.html" name="bottomFrame" scrolling="no" noresize="noresize" id="bottomFrame" />
13 </frameset>
14 <noframes><body>
15 </body>
16 </noframes></html>

 

4.admin/showVote.jsp

  1 <%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
  2 <%@ taglib prefix="s" uri="/struts-tags" %>
  3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
  4 <html xmlns="http://www.w3.org/1999/xhtml">
  5 <head>
  6 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  7 <title>显示投票</title>
  8 <style type="text/css">
  9 <!--
 10 body {
 11     margin-left: 0px;
 12     margin-top: 0px;
 13     margin-right: 0px;
 14     margin-bottom: 0px;
 15     overflow:hidden;
 16 }
 17 .STYLE1 {font-size: 12px}
 18 .STYLE4 {
 19     font-size: 12px;
 20     color: #1F4A65;
 21     font-weight: bold;
 22 }
 23 
 24 a:link {
 25     font-size: 12px;
 26     color: #06482a;
 27     text-decoration: none;
 28 
 29 }
 30 a:visited {
 31     font-size: 12px;
 32     color: #06482a;
 33     text-decoration: none;
 34 }
 35 a:hover {
 36     font-size: 12px;
 37     color: #06482a;
 38     text-decoration: none;
 39 }
 40 a:active {
 41     font-size: 12px;
 42     color: #06482a;
 43     text-decoration: none;
 44 }
 45 .STYLE7 {font-size: 12}
 46 -->
 47 </style></head>
 48 
 49 <body>
 50 <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
 51   <tr>
 52     <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
 53       <tr>
 54         <td width="15" height="30"><img src="images/tab_03.gif" width="15" height="30" /></td>
 55         <td width="1101" background="images/tab_05.gif"><img src="images/311.gif" width="16" height="16" /> <span class="STYLE4">投票管理</span></td>
 56         <td width="281" background="images/tab_05.gif">&nbsp;</td>
 57         <td width="14"><img src="images/tab_07.gif" width="14" height="30" /></td>
 58       </tr>
 59     </table></td>
 60   </tr>
 61   <tr>
 62     <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
 63       <tr>
 64         <td width="9" background="images/tab_12.gif">&nbsp;</td>
 65         <td bgcolor="#f3ffe3"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c0de98" onmouseover="changeto()"  onmouseout="changeback()">
 66           <tr>
 67             <td width="8%" height="18" background="images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">投票序号</div></td>
 68             <td width="24%" height="18" background="images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">投票名</div></td>
 69             <td width="10%" height="18" background="images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">投票选项1</div></td>
 70             <td width="14%" height="18" background="images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">投票选项2</div></td>
 71             <td width="24%" height="18" background="images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">投票选项3</div></td>
 72             <td width="7%" height="18" background="images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">删除</div></td>
 73           </tr>
 74           
 75           <!--循环输出投票数据 -->
 76           <s:iterator value="#request.voteResultList" var="voteResult">
 77                <tr>
 78             <td height="18" bgcolor="#FFFFFF" class="STYLE2"><div align="center" class="STYLE2 STYLE1">${voteResult.vote.voteID}</div></td>
 79             <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${voteResult.vote.voteName}</div></td>
 80                <!-- 只输出前三个投票选项 -->
 81             <s:subset source="#voteResult.voteOptions" id="subvoteOptions" start="0" count="3"></s:subset>
 82             <s:iterator value="#attr.subvoteOptions" var="voteOption">
 83                 <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${voteOption.voteOptionName}</div></td>
 84             </s:iterator>
 85             <td height="18" bgcolor="#FFFFFF"><div align="center"><span class="STYLE2"><img src="images/010.gif" width="9" height="9" /> </span><span class="STYLE1">[</span><a href="deleteVote.action?voteID=${voteResult.vote.voteID}">删除</a><span class="STYLE1">]</span></div></td>
 86               </tr>
 87           </s:iterator>
 88         </table></td>
 89         <td width="9" background="images/tab_16.gif">&nbsp;</td>
 90       </tr>
 91     </table></td>
 92   </tr>
 93   <tr>
 94     <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
 95       <tr>
 96         <td width="15" height="29"><img src="images/tab_20.gif" width="15" height="29" /></td>
 97         <td background="images/tab_21.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
 98           <tr>
 99             <td width="25%" height="29" nowrap="nowrap"><span class="STYLE1">共${page.totalCount}条纪录,当前第${page.currentPage}/${page.totalPage}页,每页${page.everyPage}条纪录</span></td>
100             <td width="75%" valign="top" class="STYLE1"><div align="right">
101               <table width="215" height="20" border="0" cellpadding="0" cellspacing="0">
102                 <tr>
103                 <s:if test="#request.page.hasPrePage">
104                     <td width="62" height="22" valign="middle">
105                     <div align="right">
106                         <a href="showVote.action?currentPage=1"><img src="images/first.gif" border="0"/></a>
107                     </div></td>
108                     <td width="50" height="22" valign="middle">
109                     <div align="right">
110                         <a href="showVote.action?currentPage=${page.currentPage - 1}"><img src="images/back.gif" border="0"/></a>
111                     </div></td>
112                 </s:if>
113                 <s:else>
114                     <td width="62" height="22" valign="middle">
115                     <div align="right">
116                         <img src="images/first.gif" border="0"/>
117                     </div></td>
118                     <td width="50" height="22" valign="middle">
119                     <div align="right">
120                         <img src="images/back.gif" border="0"/>
121                     </div></td>
122                 </s:else>
123                 <s:if test="#request.page.hasNextPage">
124                     <td width="54" height="22" valign="middle">
125                     <div align="right">
126                         <a href="showVote.action?currentPage=${page.currentPage+1}"><img src="images/next.gif" border="0"/></a>
127                     </div></td>
128                     <td width="49" height="22" valign="middle">
129                     <div align="right">
130                         <a href="showVote.action?currentPage=${page.totalPage}"><img src="images/last.gif" border="0"/></a>
131                     </div></td>
132                 </s:if>
133                 <s:else>
134                     <td width="54" height="22" valign="middle">
135                     <div align="right">
136                         <img src="images/next.gif" border="0"/>
137                     </div></td>
138                     <td width="49" height="22" valign="middle">
139                     <div align="right">
140                         <img src="images/last.gif" border="0"/>
141                     </div></td>
142                 </s:else>
143                   </tr>
144               </table>
145             </div></td>
146           </tr>
147         </table></td>
148         <td width="14"><img src="images/tab_22.gif" width="14" height="29" /></td>
149       </tr>
150     </table></td>
151   </tr>
152 </table>
153 </body>
154 </html>
155 <s:debug></s:debug>

 

5.admin/center.html

 1 <html xmlns="http://www.w3.org/1999/xhtml">
 2 <head>
 3 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 4 <title>无标题文档</title>
 5 <style type="text/css">
 6 <!--
 7 body {
 8     margin-left: 0px;
 9     margin-top: 0px;
10     margin-right: 0px;
11     margin-bottom: 0px;
12     overflow:hidden;
13 }
14 -->
15 </style></head>
16 
17 <body>
18 <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed">
19   <tr>
20     <td background="images/main_40.gif" style="width:3px;">&nbsp;</td>
21     <td width="177"  style="border-right:solid 1px #9ad452;"><iframe name="I2" height="100%" width="177" border="0" frameborder="0" src="left.html">
22         浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe></td>
23     <td><iframe name="I1" src="showVote.action" height="100%" width="100%" border="0" frameborder="0">
24         浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe></td>
25     <td background="images/main_42.gif" style="width:3px;">&nbsp;</td>
26   </tr>
27 </table>
28 </body>
29 </html>

 

6.admin/down.html

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 5 <title>无标题文档</title>
 6 <style type="text/css">
 7 <!--
 8 body {
 9     margin-left: 0px;
10     margin-top: 0px;
11     margin-right: 0px;
12     margin-bottom: 0px;
13 }
14 .STYLE1 {
15     color: #43860c;
16     font-size: 12px;
17 }
18 -->
19 </style></head>
20 
21 <body>
22 <table width="100%" border="0" cellspacing="0" cellpadding="0">
23   <tr>
24     <td height="24" background="images/main_47.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
25       <tr>
26         <td width="29" height="24"><img src="images/main_45.gif" width="29" height="24" /></td>
27         <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
28           <tr>
29             <td width="369"><span class="STYLE1">版本 2008V1.0 </span></td>
30             <td width="814" class="STYLE1">&nbsp;</td>
31             <td width="185" nowrap="nowrap" class="STYLE1"><div align="center"><img src="images/main_51.gif" width="12" height="12" /> 如有疑问请与技术人员联系</div></td>
32           </tr>
33         </table></td>
34         <td width="14"><img src="images/main_49.gif" width="14" height="24" /></td>
35       </tr>
36     </table></td>
37   </tr>
38 </table>
39 </body>
40 </html>

 

7.admin/left.html

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 5 <title>无标题文档</title>
 6 <style type="text/css">
 7 <!--
 8 body {
 9     margin-left: 0px;
10     margin-top: 0px;
11     margin-right: 0px;
12     margin-bottom: 0px;
13 }
14 .STYLE2 {color: #43860c; font-size: 12px; }
15 
16 a:link {font-size:12px; text-decoration:none; color:#43860c;}
17 a:visited {font-size:12px; text-decoration:none; color:#43860c;}
18 a:hover{font-size:12px; text-decoration:none; color:#FF0000;}
19 -->
20 </style>
21 <script type="text/JavaScript">
22 <!--
23 function MM_preloadImages() { //v3.0
24   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
25     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
26     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
27 }
28 
29 function MM_swapImgRestore() { //v3.0
30   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
31 }
32 
33 function MM_findObj(n, d) { //v4.01
34   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
35     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
36   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
37   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
38   if(!x && d.getElementById) x=d.getElementById(n); return x;
39 }
40 
41 function MM_swapImage() { //v3.0
42   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
43    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
44 }
45 //-->
46 </script>
47 </head>
48 
49 <body onload="MM_preloadImages('images/main_26_1.gif','images/main_29_1.gif','images/main_31_1.gif')">
50 <table width="177" height="100%" border="0" cellpadding="0" cellspacing="0">
51   <tr>
52     <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed">
53       <tr>
54         <td height="26" background="images/main_21.gif">&nbsp;</td>
55       </tr>
56       <tr>
57         <td height="80" style="background-image:url(images/main_23.gif); background-repeat:repeat-x;"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
58           <tr>
59             <td height="45"><div align="center"><a href="#"><img src="images/main_26.gif" name="Image1" width="40" height="40" border="0" id="Image1" onmouseover="MM_swapImage('Image1','','images/main_26_1.gif',1)" onmouseout="MM_swapImgRestore()" /></a></div></td>
60             <td><div align="center"><a href="#"><img src="images/main_28.gif" name="Image2" width="40" height="40" border="0" id="Image2" onmouseover="MM_swapImage('Image2','','images/main_29_1.gif',1)" onmouseout="MM_swapImgRestore()" /></a></div></td>
61           </tr>
62           <tr>
63             <td height="25"><div align="center" class="STYLE2"><a href="addVote.jsp" target="I1">新增投票</a></div></td>
64             <td><div align="center" class="STYLE2"><a href="showVote.action" target="I1">投票管理</a></div></td>
65           </tr>
66         </table></td>
67       </tr>
68       <tr>
69         <td  style="line-height:4px; background:url(images/main_38.gif)">&nbsp;</td>
70       </tr>
71       <tr>
72         <td>&nbsp;</td>
73       </tr>
74     </table></td>
75   </tr>
76 </table>
77 </body>
78 </html>

 

8.admin/top.html

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 5 <title>无标题文档</title>
 6 <style type="text/css">
 7 <!--
 8 body {
 9     margin-left: 0px;
10     margin-top: 0px;
11     margin-right: 0px;
12     margin-bottom: 0px;
13 }
14 .STYLE1 {
15     color: #43860c;
16     font-size: 12px;
17 }
18 -->
19 </style></head>
20 
21 <body>
22 <table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
23   <tr>
24     <td height="9" style="line-height:9px; background-image:url(images/main_04.gif)">&nbsp;</td>
25   </tr>
26 </table>
27 
28 </body>
29 </html>

 

9.

posted @ 2016-03-25 15:30  shamgod  阅读(637)  评论(0编辑  收藏  举报
haha