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

📄 d03.jsp

📁 持久层hibernate技术使用的一个例子
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GBK" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html>
<head>
<title>D03</title>
<link href="/css/base.css" rel="stylesheet" type="text/css">
<script src="/js/meizzDate.js" type="text/javascript"></script>
<script LANGUAGE='javascript'>
	function setValue(obj) {
      var oA = document.getElementById("tab1").getElementsByTagName("INPUT");
      for (var i = 0; i < oA.length; i++) {
       if (oA[i].type = "checkBox") {
          oA[i].checked = obj.checked;
        }
      }
    }
	function doSubmit1(start) {
      document.U01MNounceForm.action = "/U01MNounceSearchAll.do?method=search&start=" + start +"&flag=1";
      document.U01MNounceForm.submit();
	}
	function doSubmit() {
      document.U01MNounceForm.action = "/U01MNounceDelete.do";
      document.U01MNounceForm.method.value = "delete";
      document.U01MNounceForm.flag.value = "0";
      document.U01MNounceForm.submit();
	}
	function doSubmit2() {
      document.U01MNounceForm.action = "/U01MNounceInsert.do";
      document.U01MNounceForm.submit();
	}
</script>
</head>

<html:form action="/U01MNounceSearch">
<html:hidden property="method" value="search" />
<html:hidden property="flag" value="2" />
<table width="80%"  border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td><span class="font_title">公告管理</span></td>
  </tr>
</table>
  <div align="center">
    <table width="80%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#7AA1E6">
      <tr bordercolor="1" bgcolor="#FFFFFF">
        <td width="20%">
        <div align="center">开始时间:</div></td>
        <td width="30%">
          <html:text property="startTime" readonly="true" style="cursor:hand" onclick="setday(this,document.U01MNounceForm.startTime)"/>
        </td>
        <td align="center" width="20%">结束时间:</td>
        <td width="30%">
          <html:text name="U01MNounceForm" property="endTime" readonly="true" style="cursor:hand" onclick="setday(this,document.U01MNounceForm.endTime)"/>
          
        </td>
      </tr>
      <tr align="center" bordercolor="1" bgcolor="#FFFFFF">
        <td><div align="center">公告标题:</div></td>
        <td><div align="left">
          <html:text property="mNounce.NTitle" styleClass="input-text" />
        </div></td>
        <td><div align="center">公告分类:</div></td>
        <td >
		  <div align="left">
		    <html:select name="U01MNounceForm" property="mNtype.typeId" styleClass="input-select" styleId="mhtype">
              <html:option value="">
                请选择帮助分类
              </html:option>
              <html:options collection="ntype" property="typeId" labelProperty="NType" />
            </html:select>
          </div></td>
        
      </tr>
      <tr align="center" bordercolor="1" bgcolor="#FFFFFF">
        <td>查询方式</td>
        <td align="left">
          <html:select property="isEq" size="1">
		      <html:option value="0">精确查询</html:option>
		      <html:option value="1">模糊查询</html:option>
	        </html:select>
        </td>
        <td colspan="2"><div align="right">
        <html:errors property="startTime" />
          <html:submit styleClass="inputstyle2">
     		检索
	      </html:submit>      
        </div></td>
      </tr>
      </table>
      <table width="80%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#7AA1E6" id="tab1">
      <tr align="center" bordercolor="1" bgcolor="#FFFFFF">
        <td width="30%"><div align="center">公告标题</div></td>
        <td width="20%"><div align="center">公告日期</div></td>
        <td width="30%"><div align="center">公告分类</div></td>
        <td width="20%"><div align="center">删除</div></td>
      </tr>
      <logic:present name="mNounceList">
        <logic:iterate id="mn" name="mNounceList" property="rs">
          <tr align="center" bordercolor="1" bgcolor="#FFFFFF">
            <td align="center" height="20">
              <a href="/U01MNounceAction.do?method=find&nId=<bean:write name="mn" property="NId"/>">
                <bean:write name="mn" property="NTitle" />
              </a>
            </td>
            <td align="center">
              <bean:write name="mn" property="NTime" format="yyyy-MM-dd"/>
            </td>
            <td align="center">
              <a href="/U01MNtypeAction.do?method=search&typeId=<bean:write name="mn" property="MNtype.typeId"/>">
              <bean:write name="mn" property="MNtype.NType"/>
              </a>
            </td>
            <td align="center">
              <html:multibox  property="mNounce.NIds"><bean:write name="mn" property="NId" /></html:multibox>
            </td>
          </tr>
        </logic:iterate>
      </logic:present>
    </table>
    <logic:present name="mNounceList">
      <table width="80%" align="center">
        <tr>
          <td height="20" align="left">
            页数:
            <bean:write name="mNounceList" property="currentPage" />
            /
            <bean:write name="mNounceList" property="totalPage" />
            页&nbsp;每页:
            <bean:write name="mNounceList" property="range" />
            总数:
            <bean:write name="mNounceList" property="count" />
          </td>
          <td align="right">
            <bean:write name="mNounceList" property="fenye" filter="false" />
          </td>
        </tr>
      </table>
    </logic:present>
    </table>
      全选<input type="checkbox" name="all_select" value="checkbox" onClick="setValue(this)" class="input-checkbox">
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <html:submit styleClass="inputstyle2" onclick="doSubmit();">
  	    删除
  	  </html:submit>
  	  <html:errors property="mNounce.NIds" />
	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	  <html:submit styleClass="inputstyle2" onclick="doSubmit2();">
  	    添加
  	  </html:submit>
  	  <br />
      <br /><br />
  </div>
</html:form>
</body>
</html>

⌨️ 快捷键说明

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