⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sendbox.jsp

📁 基于J2EE的办公自动化系统。实现流程定义流程办理等。运用了hibernate+struts+spring框架综合运用的系统。
💻 JSP
字号:

<%@ page language="java" pageEncoding="GBK"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>无标题文档</title>
<style>
	a{TEXT-DECORATION:none }
	body{ font-size:12px}
	
	
</style> 

<script>
	function isAllCheck(){
		var check = document.getElementById("allcheck");
		if(check.checked==true){
		//选中了,下面的要全部选上
			var child = document.getElementsByName("check");
			for(var i=0; i<child.length; i++){
				child[i].checked=true;
			}
		}else{
			var child = document.getElementsByName("check");
			for(var i=0; i<child.length; i++){
				child[i].checked=false;
			}
		}
	}
	
	//全选
	function allCheck(){
		var check = document.getElementById("allcheck");
		check.checked=true;
		
		var child = document.getElementsByName("check");
		for(var i=0; i<child.length; i++){
			child[i].checked=true;
		}
		
	}
	
	//反选
	function check(){
		var check = document.getElementById("allcheck");
		if(check.checked==true){
			check.checked=false;
		}else if(check.checked==false){
			check.checked=true;
		}
		var child = document.getElementsByName("check");
			for(var i=0; i<child.length; i++){
				if(child[i].checked==true){
					child[i].checked=false;
				}else if(child[i].checked==false){
					child[i].checked=true;
				}
					
			}
	}
	
	//不选
	function nocheck(){
		var check = document.getElementById("allcheck");
		check.checked=false;
		var child = document.getElementsByName("check");
			for(var i=0; i<child.length; i++){
				child[i].checked=false;
			}
	}
	
	
	function go(method){
		var child = document.getElementsByName("check");
		var flag = false;
		for(var i=0; i<child.length; i++){
			if(child[i].checked==true){
				flag = true;
			}			
		}
		
		if(flag ==false){
			alert("请选择删除对象");
			return false;
		}
		
		document.getElementById("method").value=method; 
	}
</script>
</head>

<body>
<html:form action="/email" method="post">
<html:hidden property="method" value=""/>
<table width="100%" border="1">

	<tr>
    <td colspan="2">查看:
    		<a href="${pageContext.request.contextPath}/email.do?method=receiveBox&emailtype=2&sendid=${sessionScope.user.uno});" style="margin-left:10px">全部</a>-
    		
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <table width="100%" border="1">
      <tr>
      	<td width="8%" align="center"><input type="checkbox" name="allcheck" onclick="isAllCheck();"/></td>
        <td>收件人</td>
        <td>主题</td>
        <td>日期</td>
        <td>附件</td>
      </tr>
      
      
      <logic:notPresent name="letterpage" property="list" scope="request">
      	<tr> <td colspan="5" align>暂时没有数据</td></tr>
      </logic:notPresent>
      <logic:present name="letterpage" property="list" scope="request">
      	<logic:empty name="letterpage" property="list" scope="request">
      		<tr> <td colspan="5" align>暂时没有数据</td></tr>
      	</logic:empty>
      	<logic:notEmpty name="letterpage" property="list" scope="request">
     		
     		 <logic:iterate id="letter" name="letterpage" property="list" scope="request">      
		      <tr>
		     	 <td align="center">
		     	 	<html:multibox property="check" value="${letter.emailid}"></html:multibox>
		     	 </td>
		        <td>
		        	<bean:write name="letter" property="receivename"/>
				</td>
		        <td>
			        <html:link action="/email.do?method=readEmail&isread=${letter.isread}&emailid=${letter.emailid}">
			        	<bean:write  name="letter" property="title"/>
			        </html:link>
		        </td>
		        <td>
		        	<bean:write name="letter" property="sendtime"/>
				</td>
		        <td>
		        	<logic:equal value="1" name="letter" property="isfujian"><font color="red">有附件</font></logic:equal>
					<logic:equal value="0" name="letter" property="isfujian">无附件</logic:equal>	 
				</td>
		      </tr>
		      </logic:iterate> 		
      	</logic:notEmpty>
      </logic:present>
     
      
      
      
    </table></td>
  </tr>
  <tr>
  
  	<td width="40%">选择:<a href="javascript:allCheck();" style="margin-left:10px">全部</a>-    		 
             <a href="javascript:check();" style="margin-left:10px">反选</a>-
             <a href="javascript:nocheck();" style="margin-left:10px">不选</a>    </td>
    <td width="60%">
    	 <bean:write name="letterpage" property="pageBar" filter="false"/>
    </td>
  </tr>
  <tr>
  	<td colspan="2">
    	<input type="submit" value="彻底删除" onclick="return go('delsForever');"/>
    </td>
  </tr>
</table>
</html:form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -