jsp中的form提交和servlet问题?
我在jsp中的form中加
<INPUT type= "submit " name= "qd " value= "人员授权 " onClick= "window.close() ">
提交按钮
来关闭当前页,并且进入servlet中
<form name= "form1 " action= "../Cdsqservlet?cdid= <%=CDid%> " method= "POST ">
但是点提交按钮的时候,关闭当前页,但是没有执行servlet,这是为什么?
下面是代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN ">
<HTML>
<HEAD>
<%@ page
language= "java "
contentType= "text/html; charset=GB18030 "
pageEncoding= "GB18030 "
import= "java.sql.*,com.linkdb.*,java.util.StringTokenizer "
%>
<META http-equiv= "Content-Type " content= "text/html; charset=GB18030 ">
<META name= "GENERATOR " content= "IBM WebSphere Studio ">
<META http-equiv= "Content-Style-Type " content= "text/css ">
<LINK href= "../theme/Master.css " rel= "stylesheet " type= "text/css ">
<TITLE> cdsq.jsp </TITLE>
<jsp:useBean id= "cdsq " class= "com.cdsqbean.Cdsqbean " scope= "page "> </jsp:useBean>
<jsp:useBean id= "ry " class= "com.dbopt.Ryxxoptbean " scope= "page "> </jsp:useBean>
<%
request.setCharacterEncoding( "GB18030 ");
response.setContentType( "text/html; charset=GB18030 ");
String cdid=request.getParameter( "cdid ");
int CDid=Integer.parseInt(cdid);
cdsq.delsq(CDid);
%>
<style>
td, select, input {
font-size: 9pt
}
.sel {
font-size: 12px;
width: 100px;
position: relative;
left: -2px;
top: -2px;
}
.box {
border: 1 solid #BBBBBB;
height: 19px;
width: 99px;
}
.box2 {
border: 1 solid #FFFFFF;
overflow: hidden;
height: 22px;
}
</style>
<script language= 'Javascript '>
//***********************************************************************************
var subcat = new Array();
<%
String sql= "SELECT ryxm,bmmc,rybm FROM t_xtryb a,t_xtbmb b where a.szbmbm=b.bmbm order by bmpx ";
AbstractPersistenceFactory con=new AbstractPersistenceFactory ();
Connection conn=con.getconnections();
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery(sql);
int temp=0;
while(rs.next()){
%>
subcat[ <%=temp%> ]=new Array( " <%=rs.getString( "ryxm ")%> ", " <%=rs.getStr