caogaobox.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. table{ }
  15. </style> 
  16. <script>
  17. function isAllCheck(){
  18. var check = document.getElementById("allcheck");
  19. if(check.checked==true){
  20. //选中了,下面的要全部选上
  21. var child = document.getElementsByName("check");
  22. for(var i=0; i<child.length; i++){
  23. child[i].checked=true;
  24. }
  25. }else{
  26. var child = document.getElementsByName("check");
  27. for(var i=0; i<child.length; i++){
  28. child[i].checked=false;
  29. }
  30. }
  31. }
  32. //全选
  33. function allCheck(){
  34. var check = document.getElementById("allcheck");
  35. check.checked=true;
  36. var child = document.getElementsByName("check");
  37. for(var i=0; i<child.length; i++){
  38. child[i].checked=true;
  39. }
  40. }
  41. //反选
  42. function check(){
  43. var check = document.getElementById("allcheck");
  44. if(check.checked==true){
  45. check.checked=false;
  46. }else if(check.checked==false){
  47. check.checked=true;
  48. }
  49. var child = document.getElementsByName("check");
  50. for(var i=0; i<child.length; i++){
  51. if(child[i].checked==true){
  52. child[i].checked=false;
  53. }else if(child[i].checked==false){
  54. child[i].checked=true;
  55. }
  56. }
  57. }
  58. //不选
  59. function nocheck(){
  60. var check = document.getElementById("allcheck");
  61. check.checked=false;
  62. var child = document.getElementsByName("check");
  63. for(var i=0; i<child.length; i++){
  64. child[i].checked=false;
  65. }
  66. }
  67. function go(method){
  68. var child = document.getElementsByName("check");
  69. var flag = false;
  70. for(var i=0; i<child.length; i++){
  71. if(child[i].checked==true){
  72. flag = true;
  73. }
  74. }
  75. if(flag ==false){
  76. alert("请选择删除对象");
  77. return false;
  78. }
  79. document.getElementById("method").value=method; 
  80. }
  81. </script>
  82. </head>
  83. <body>
  84. <html:form action="/email" method="post">
  85. <html:hidden property="method" value=""/>
  86. <table width="100%" border="1">
  87.   <tr>
  88.     <td colspan="2"><table width="100%" border="1">
  89.       <tr>
  90.         <td width="8%" align="center"><input type="checkbox" name="allcheck" onclick="isAllCheck();"/></td>        
  91.         <td width="14%">收件人</td>
  92.         <td width="29%">主题</td>
  93.         <td width="25%">日期</td>
  94.         
  95.       </tr>
  96.       
  97.       <logic:notPresent name="letterpage" property="list">
  98.        <tr>
  99.        <td colspan="4">暂时没有数据</td>
  100.        </tr>
  101.       </logic:notPresent>
  102.       <logic:present name="letterpage" property="list">
  103.        <logic:empty name="letterpage" property="list">
  104.        <tr>
  105.        <td colspan="4">暂时没有数据</td>
  106.        </tr>
  107.        </logic:empty>
  108.        <logic:notEmpty name="letterpage" property="list">
  109.         
  110.        <logic:iterate id="letter" name="letterpage" property="list">
  111.       <tr>
  112.         
  113.         <td align="center">
  114.          <html:multibox property="check" value="${letter.emailid}"></html:multibox>
  115.         </td>
  116.         <td>
  117.          <bean:write name="letter" property="receivename"/>
  118.         </td>
  119.         <td>
  120.          <html:link action="/email.do?method=readEmailCaoGao&emailid=${letter.emailid}">
  121.          <bean:write name="letter" property="title"/>
  122.          </html:link>
  123. </td>
  124.         <td>
  125.          <bean:write name="letter" property="sendtime"/>
  126. </td>
  127.         
  128.       </tr>
  129.       
  130.        </logic:iterate>
  131.       
  132.        </logic:notEmpty>
  133.       </logic:present>
  134.      
  135.     </table></td>
  136.   </tr>
  137.   <tr>
  138.   
  139. <td width="40%">选择:<a href="javascript:allCheck();" style="margin-left:10px">全部</a>-      
  140.      <a href="javascript:check();" style="margin-left:10px">反选</a>-
  141.      <a href="javascript:nocheck();" style="margin-left:10px">不选</a>    
  142. </td>
  143.   <td width="60%" align="right">
  144. <bean:write name="letterpage" property="pageBar" filter="false"/>
  145.     </td>
  146.   </tr>
  147.   <tr>
  148.    <td colspan="2">
  149.     
  150.      <input  type="submit" value="彻底删除" onclick="return go('delsForever');"/>        
  151.     </td>
  152.   </tr>
  153. </table>
  154. </html:form>
  155. </body>
  156. </html>