jsp 提交 按钮不管用

wenwen1 发布于 2012/09/07 17:01
阅读 861
收藏 0
<%@ page language="java" import="java.util.*" import="java.sql.*" contentType="text/html;charset=UTF-8" pageEncoding="utf-8"%>
<jsp:useBean id="dbConn" class="pack_convert.DBConnXmgl"/>
<jsp:useBean id="systemRelated" class="net.gvsun.database.SystemRelated"/>
<%@ page session="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>项目计划</title>
    <style type="text/css">
        label{
            width:100px;
            display:block;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="../../jquery/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../jquery/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../../jquery/css/demo.css">
    <script type="text/javascript" src="../../jquery/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="../../jquery/js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../jquery/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../../jquery/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../js/proApplication.js"></script>
    <script type="text/javascript">
//--------------------------验证是否为空 ------------------------------------------   
    function doCheck(){
     if(form2.Project_ID.value==""){
      alert("请输入项目性质");
      form2.Project_ID.focus();
      return false;
     }
     else if(form2.Ext_Name.value==""){
      alert("请输入项目名称!");
      form2.Ext_Name.focus();
      return false;   
    }
    else if(form2.Setup_Date.value==""){
      alert("请输入项目委托负责人!");
      form2.Setup_Date.focus();   
    }
    else{
      return true;
    }
  }
  //------------------------------结束 -----------------------------
</script>
</head>
<%
request.setCharacterEncoding("utf-8");//处理乱码
String datenow = systemRelated.getDateNow();
String ID = request.getParameter("ID");
ID="2";
int id = Integer.parseInt(ID);
String sql = "select * from project where ID="+id;
ResultSet rs = dbConn.doQuery(sql);
if(rs.next()){
 %>
<body>
  <div style="background:#fafafa;padding:10px;">
  <form id="xmmc" name="form1">
  <input type="hidden" name="ID" value=<%=rs.getInt("ID") %> />
  <fieldset>
   <legend>项目基本信息(带*号为必填项)</legend>
    <table>
      <tr><td><label for="Project_ID">项目性质*:</label></td>
           <td><input class="easyui-validatebox" type="text" name="Project_ID" value=<%=rs.getString("Project_ID") %> disabled></input></td>
           <td align="right"><label for="Project_NAME">项目名称*:</label></td>
           <td><input class="easyui-validatebox" width="300px" type="text" name="Project_NAME" value=<%=rs.getString("Project_NAME")%> disabled></input></td></tr>
       <tr><td><label for="Setup_DATE">项目开始时间*:</label></td>
           <td><input class="easyui-datebox" type="text" id="Setup_DATE" name="Setup_DATE" value=<%=rs.getString("Setup_DATE") %> disabled></input></td>
           <td align="right"><label for="Setup_BY">项目委托单位法人代表/负责人*:</label></td>
           <td><input class="easyui-validatebox" type="text" id="Setup_BY" name="Setup_BY" value=<%=rs.getString("Setup_BY") %> disabled></input></td></tr>
       <tr><td><label for="Specification">备注:</label></td>
           <td><textarea id="Specification" name="Specification"><%=rs.getString("Specification") %></textarea></td></tr>
    </table>
  </fieldset>
     </form>
     <form id="xm" name="form2" method="post" action="proApplicationSub.jsp" onSubmit="return doCheck()">
     <input type="hidden" name="ID" value=<%=rs.getInt("ID") %> />
       <fieldset>
        <legend>项目信息(带*号为必填项)</legend>
          <table id="one">
           <tr><td><label for="Application_ID">学科领域码*:</label></td>
               <td><input class="easyui-validatebox" type="text"  name="Application_ID" required="true"></input></td>
               <td align="right"><label for="Ext_Name">学科领域*:</label></td>
               <td><input class="easyui-validatebox" type="text" id="Ext_Name" name="Ext_Name" required="true"></input></td></tr>
           <tr><td><label for="Project_Requirement">项目委托单位*:</label></td>
               <td><input class="easyui-validatebox" type="text" name="Project_Requirement" required="true"></input></td>
               <td align="right"><label for="Source_From">项目来源*:</label></td>
               <td><select  id="Source" name="Source_From"><option>----请选择一种项目来源----</option></select></td></tr>
           <tr><td><label for="post_code">邮编*:</label></td>
               <td><input class="easyui-validatebox" type="text" id="post_code" name="post_code" required="true" ></input></td>
               <td align="right"><label for="Setup_Date">登记时间*:</label></td>
               <td><input class="easyui-datebox" type="text" name="Setup_Date" value='<%=datenow %>' disabled></input></tr>
           <tr><td><label for="xmyjwcsj">项目预计完成时间*:</label></td>
               <td><input class="easyui-datebox" type="text" name="xmyjwcsj" required="true" ></input></td>
               <td align="right"><label for="pzwcsj">批准完成时间*:</label></td>
               <td><input class="easyui-datebox" type="text" name="xmyjwcsj" required="true" ></input></td></tr>
           <tr><td><label for="sfwdhy">所服务的国民经济行业*:</label></td>
               <td><select  id="sfwd" name="sfwdhy"><option>------请选择一种经济行业-------</option></select></td>
               <td align="right"><label for="Project_Attribute">活动类型*:</label></td>
               <td><select id="hdlx" name="Project_Attribute"><option>------请选择一种活动类型-------</option></select></td></tr>
           <tr><td><label for="Desicion_Line">联系地址*:</label></td>
               <td><input class="easyui-validatebox" type="text" id="Desicion_Line" name="Desicion_Line" required="true" ></input></td>
               <td align="right"><label for="Project_Budget">合同经费*:</label></td>
               <td><input class="easyui-validatebox" type="text" id="Project_Budget" name="Project_Budget" required="true" ></input></td></tr>
           </table>
  </fieldset>
        <p align="center">
         <input type="submit" name="submit"  value="提交"/>
         <input type="reset" name="reset"  value="重置"/> 
        </p>       
     </form>
      <%
     }
     %>
  </div>   
</body>
</html>
我为什么按提交按钮不管用啊?
加载中
0
绝对零度
绝对零度
鬼才看得懂你的代码
返回顶部
顶部