sendbox.jsp
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page language="java" pageEncoding="GBK"%>
  2. <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
  3. <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
  4. <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
  5. <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
  10. <title>无标题文档</title>
  11. <style>
  12. a{TEXT-DECORATION:none }
  13. body{ font-size:12px}
  14. </style> 
  15. <script>
  16. function isAllCheck(){
  17. var check = document.getElementById("allcheck");
  18. if(check.checked==true){
  19. //选中了,下面的要全部选上
  20. var child = document.getElementsByName("check");
  21. for(var i=0; i<child.length; i++){
  22. child[i].checked=true;
  23. }
  24. }else{
  25. var child = document.getElementsByName("check");
  26. for(var i=0; i<child.length; i++){
  27. child[i].checked=false;
  28. }
  29. }
  30. }
  31. //全选
  32. function allCheck(){
  33. var check = document.getElementById("allcheck");
  34. check.checked=true;
  35. var child = document.getElementsByName("check");
  36. for(var i=0; i<child.length; i++){
  37. child[i].checked=true;
  38. }
  39. }
  40. //反选
  41. function check(){
  42. var check = document.getElementById("allcheck");
  43. if(check.checked==true){
  44. check.checked=false;
  45. }else if(check.checked==false){
  46. check.checked=true;
  47. }
  48. var child = document.getElementsByName("check");
  49. for(var i=0; i<child.length; i++){
  50. if(child[i].checked==true){
  51. child[i].checked=false;
  52. }else if(child[i].checked==false){
  53. child[i].checked=true;
  54. }
  55. }
  56. }
  57. //不选
  58. function nocheck(){
  59. var check = document.getElementById("allcheck");
  60. check.checked=false;
  61. var child = document.getElementsByName("check");
  62. for(var i=0; i<child.length; i++){
  63. child[i].checked=false;
  64. }
  65. }
  66. function go(method){
  67. var child = document.getElementsByName("check");
  68. var flag = false;
  69. for(var i=0; i<child.length; i++){
  70. if(child[i].checked==true){
  71. flag = true;
  72. }
  73. }
  74. if(flag ==false){
  75. alert("请选择删除对象");
  76. return false;
  77. }
  78. document.getElementById("method").value=method; 
  79. }
  80. </script>
  81. </head>
  82. <body>
  83. <html:form action="/email" method="post">
  84. <html:hidden property="method" value=""/>
  85. <table width="100%" border="1">
  86. <tr>
  87.     <td colspan="2">查看:
  88.      <a href="${pageContext.request.contextPath}/email.do?method=receiveBox&emailtype=2&sendid=${sessionScope.user.uno});" style="margin-left:10px">全部</a>-
  89.     
  90.     </td>
  91.   </tr>
  92.   <tr>
  93.     <td colspan="2">
  94.     <table width="100%" border="1">
  95.       <tr>
  96.        <td width="8%" align="center"><input type="checkbox" name="allcheck" onclick="isAllCheck();"/></td>
  97.         <td>收件人</td>
  98.         <td>主题</td>
  99.         <td>日期</td>
  100.         <td>附件</td>
  101.       </tr>
  102.       
  103.       
  104.       <logic:notPresent name="letterpage" property="list" scope="request">
  105.        <tr> <td colspan="5" align>暂时没有数据</td></tr>
  106.       </logic:notPresent>
  107.       <logic:present name="letterpage" property="list" scope="request">
  108.        <logic:empty name="letterpage" property="list" scope="request">
  109.        <tr> <td colspan="5" align>暂时没有数据</td></tr>
  110.        </logic:empty>
  111.        <logic:notEmpty name="letterpage" property="list" scope="request">
  112.      
  113.        <logic:iterate id="letter" name="letterpage" property="list" scope="request">      
  114.       <tr>
  115.        <td align="center">
  116.         <html:multibox property="check" value="${letter.emailid}"></html:multibox>
  117.        </td>
  118.         <td>
  119.          <bean:write name="letter" property="receivename"/>
  120. </td>
  121.         <td>
  122.         <html:link action="/email.do?method=readEmail&isread=${letter.isread}&emailid=${letter.emailid}">
  123.          <bean:write  name="letter" property="title"/>
  124.         </html:link>
  125.         </td>
  126.         <td>
  127.          <bean:write name="letter" property="sendtime"/>
  128. </td>
  129.         <td>
  130.          <logic:equal value="1" name="letter" property="isfujian"><font color="red">有附件</font></logic:equal>
  131. <logic:equal value="0" name="letter" property="isfujian">无附件</logic:equal>  
  132. </td>
  133.       </tr>
  134.       </logic:iterate> 
  135.        </logic:notEmpty>
  136.       </logic:present>
  137.      
  138.       
  139.       
  140.       
  141.     </table></td>
  142.   </tr>
  143.   <tr>
  144.   
  145.    <td width="40%">选择:<a href="javascript:allCheck();" style="margin-left:10px">全部</a>-      
  146.              <a href="javascript:check();" style="margin-left:10px">反选</a>-
  147.              <a href="javascript:nocheck();" style="margin-left:10px">不选</a>    </td>
  148.     <td width="60%">
  149.       <bean:write name="letterpage" property="pageBar" filter="false"/>
  150.     </td>
  151.   </tr>
  152.   <tr>
  153.    <td colspan="2">
  154.      <input type="submit" value="彻底删除" onclick="return go('delsForever');"/>
  155.     </td>
  156.   </tr>
  157. </table>
  158. </html:form>
  159. </body>
  160. </html>