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

📄 c1.jsp

📁 持久层hibernate技术使用的一个例子
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=gbk" import="java.util.*"%>


<%@ 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" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html:html>
<head>
<title>查看个人资料</title>
<link href="/css/base.css" rel="stylesheet" type="text/css">
<Script LANGUAGE='javascript'> 
  		 function doSubmit1(start) {
       		 document.c1.action="/C1.do?method=find&start="+start;
        	 document.c1.submit();
      }
      function subAciton1(){
      	document.c1.method.value="find";
      	document.c1.submit();
      }
      function subAciton2(){
      	document.c1.method.value="baobiao";
      	document.c1.submit();
      }
      function subAciton3(){
      	document.c1.method.value="send";
      	document.c1.submit();
      }
    </Script> 
</head>

<body>


<table width="80%"  border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td><span class="font_title">查看个人资料</span></td>
  </tr>
</table>
<html:form action="/C1s">
<html:hidden property="method" value="find"/>
<table width="80%" height="20"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#7AA1E6">
	<tr align="center" bordercolor="1" bgcolor="#FFFFFF">
		<td width="17%" height="20">
  		学历
	      <html:select property="grade_select" size="1">
	        <html:option value="0">请选择</html:option>
	        <html:option value="1">大专</html:option>
	        <html:option value="2">本科</html:option>
	        <html:option value="3">研究生</html:option>
	        <html:option value="4">博士</html:option>
	        <html:option value="5">硕士</html:option>
	  	  </html:select>
 		</td>
 		<td width="18%" height="20">
 		性别
		  <html:select property="sex_select" size="1">
		        <html:option value="0">请选择</html:option>
		        <html:option value="1">男</html:option>
		        <html:option value="2">女</html:option>     
		  </html:select>
	   </td>
 	   <td width="18%" height="20">
 	    年龄
		  <html:select property="age_select" size="1">
		        <html:option value="0">请选择</html:option>
		        <html:option value="1">20岁以下</html:option>
		        <html:option value="2">20-25岁</html:option>
		        <html:option value="3">26-30岁</html:option>
		        <html:option value="4">30岁以上</html:option>
		  </html:select>
	   </td>
       <td width="18%" height="20">
        班级
	   <html:select property="class_select" size="1">
	  		<html:option value="0">请选择</html:option>
	    	<html:options collection="c1value" property="SClassid" labelProperty="SClassname"/>
	   </html:select>
	  </td>
	  <td width="18%" height="20">	  
        姓名
	   <html:text property="name_text"  size="8"/>
     </td>
     <td height="10" width="20%">	  
      <html:submit styleClass="inputstyle2" onclick="subAciton1();">
      	查询
      </html:submit>
     </td>
   </tr>
 </table>
<br>
</html:form>
<html:form action="/C1">
<table width="80%" height="20"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#7AA1E6">
	<tr align="center" bordercolor="1" bgcolor="#FFFFFF">
		<td height="20" colspan="4">
		 	信息列表
		</td>
	</tr>
	<tr align="center" bordercolor="1" bgcolor="#FFFFFF">
		<td width="25%" height="20">
		  学生ID
		</td>
		<td width="25%">
		  <center>学生姓名
		  </center>
		</td>
		<td width="30%">
		  <center>注册时间
		  </center>
	    </td>
		<td>
		 	发送对象 
	    </td>
	</tr>

<logic:present name="nameList">
	<logic:iterate id="lists" name="nameList" property="rs">
	<tr align="center" bordercolor="1" bgcolor="#FFFFFF">
		<td>
		  <bean:write name="lists" property="SUsername"/>
		</td>
		<td height="20">
		  <center>
		 	 <html:link href="/c10.do?method=around&id=${lists.SUsername}">
		    	<bean:write name="lists" property="SName"/>
		     </html:link>
		  </center>
		</td>
		
		<td>
		  <center>
		  <bean:write name="lists" property="SEnroltime" format="yyyy-MM-dd HH:mm:ss"/>
		  </center>
		</td>
		<td>
		 <html:checkbox property="mail_box" value="${lists.SUsername}"/>
		</td>
	</tr>
	</logic:iterate>
</logic:present>

 <tr align="center" bordercolor="1" bgcolor="#FFFFFF">
  <td colspan="5">
  <html:submit  styleClass="inputstyle2" onclick="subAciton2();">
 	打印报表
  </html:submit>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  
  <html:submit  styleClass="inputstyle2" onclick="subAciton3();">
  	发送E-mail
  </html:submit>

  </td>
  </tr>
</table>





<table width="80%"  border="0" align="center" cellpadding="4" cellspacing="0">
<logic:present name="nameList">
	<tr bordercolor="0" >
		<td> 
	  		
		  <div align="left">
            <bean:write name="nameList" property="count" />
            条记录
		    <select name="zzz" onchange="doSubmit1(this.options(selectedIndex).value)">
           	<c:forEach var="i" begin="1" end="${nameList.totalPage}">
            <option value="${(i-1)*nameList.range}"
            <c:if test="${(i==nameList.currentPage)}">
            selected
            </c:if>	
           >
            ${i}
          
            </option>
           </c:forEach>
            </select> 
		</td>
				
        <td align="right">
            <bean:write name="nameList" property="fenye" filter="false" />
        </td>
         

</tr>
</logic:present>
</table>
</html:form>
</html:html>

</body>

⌨️ 快捷键说明

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