主题:为什么打不开窗口
<%@ page language="java" import="java.sql.*" import="java.util.*" %>
<%@ page contentType="text/html;charset=GB2312" %>
<jsp:useBean id="zc" scope="session" class="MyJavaBean.MyJavaBean"/>
<html>
<body>
<%
boolean cf=false;
request.setCharacterEncoding("GB2312");
String q1=request.getParameter("t1");
session.setAttribute("h",q1);
String sqlx="select yhm from zc";
ResultSet rs1=zc.es(sqlx);
while(rs1.next())
{
cf=(rs1.getString("yhm")).equals(q1);
if(cf ==true)
{break;
}
}
if(cf ==false)
{
%>
<script language="javascript">
window.open("cf1.jsp","","height=40,width=40");
location.href="j1.jsp";
</script>
<%
}
if(cf == true){
%>
<script language="javascript">
alert("对不起,此用户名已被占用");
location.href="m.jsp";
</script>
<%}%>
</body>
</html>
请问本程序为什么不能打开cf1.jsp,十分感谢
<%@ page contentType="text/html;charset=GB2312" %>
<jsp:useBean id="zc" scope="session" class="MyJavaBean.MyJavaBean"/>
<html>
<body>
<%
boolean cf=false;
request.setCharacterEncoding("GB2312");
String q1=request.getParameter("t1");
session.setAttribute("h",q1);
String sqlx="select yhm from zc";
ResultSet rs1=zc.es(sqlx);
while(rs1.next())
{
cf=(rs1.getString("yhm")).equals(q1);
if(cf ==true)
{break;
}
}
if(cf ==false)
{
%>
<script language="javascript">
window.open("cf1.jsp","","height=40,width=40");
location.href="j1.jsp";
</script>
<%
}
if(cf == true){
%>
<script language="javascript">
alert("对不起,此用户名已被占用");
location.href="m.jsp";
</script>
<%}%>
</body>
</html>
请问本程序为什么不能打开cf1.jsp,十分感谢