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

📄 d07.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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>D07</title>
<link href="/css/base.css" rel="stylesheet" type="text/css">
<Script Language="JavaScript"> 
    function setValue(obj) {
        var oA = document.getElementById("tab1").getElementsByTagName("INPUT");
        if (obj.checked==true){
          for (var i = 0; i < oA.length; i++) {
            if (oA[i].type = "checkBox") {
              oA[i].checked = false;
            }
          }
          obj.checked=true;
        }        
      }
      function doSubmit() {
        document.U01TBlogTypeForm.method.value = "update";
        document.U01TBlogTypeForm.checkValidatoe.value = "0";
        document.U01TBlogTypeForm.submit();
      }
      function doSubmitD() {
        document.U01TBlogTypeForm.method.value = "delete";
        document.U01TBlogTypeForm.submit();
      }
    </Script>
	</head>

<body>

<html:form action="/U01TBlogtypeAction">
<html:hidden property="method" value="insert" />
<html:hidden property="checkValidatoe" value="1" />
<table width="80%"  border="0" align="center" cellpadding="4" cellspacing="0" >
  <tr>
    <td><span class="font_title">教师blog分类管理</span></td>
  </tr>
</table>
  <div align="center">
  <table width="80%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#7AA1E6" id="tab1">
    <tr align="center" bordercolor="1" bgcolor="#FFFFFF">
      <td width="49%"><div align="center">blog分类</div></td>
      <td width="51%"><div align="center">修改/删除</div></td>
    </tr>
    <logic:present name="blogtypeList">
      <logic:iterate id="blogtype" name="blogtypeList">
    <tr align="center" bordercolor="1" bgcolor="#FFFFFF">
      <td><bean:write name="blogtype" property="TTitle"/></td>
      <td>
        <html:multibox property="tBlogtype.TTypeid"  onclick="setValue(this)">
          <bean:write name="blogtype" property="TTypeid"/>
        </html:multibox>
      </td>
    </tr>
      </logic:iterate>
    </logic:present>
  </table>
  
  <div align="center">
  
  	<html:errors property="error" />
  	<html:errors property="tBlogtype.TTypeid" />
  <br/>
      <br/>
  <table width="80%" align="center" border="0">
    <tr>
    <td align="right" width="30%">blog分类:</td>
    <td align="left">
      <html:text property="tBlogtype.TTitle" styleClass="input-text" /><br/>
      <html:errors property="tBlogtype.TTitle" />
    </td>
    <td>
    <html:submit styleClass="inputstyle2">
     添加
	</html:submit>
  &nbsp;&nbsp;
    <html:submit styleClass="inputstyle2" onclick="doSubmit();">
     修改
    </html:submit>
    </td>
    </tr>
    <td align="right">移动到:</td>
    <td align="left">
      <html:select  property="tBlogtype.moveId" styleClass="input-select">
              <html:option value="">
                请选择
              </html:option>
              <html:options collection="blogtypeList" property="TTypeid" labelProperty="TTitle" />
      </html:select>
    </td>
    <td>
     <html:submit styleClass="inputstyle2" onclick="doSubmitD();">
     删除
    </html:submit>
    </td>
  </table>
    
  </div>
  </div>
</html:form>
</body>
</html>

⌨️ 快捷键说明

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