JSP中的客户端验证问题:点击提交后无反应?

来源:百度知道 编辑:UC知道 时间:2024/05/28 17:23:12
以下是register.jsp的代码:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>用户注册</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my

没有错误啊

在IE和fireFox中帮你测试下,没有问题啊

在 <form onsubmit=>中的调用你的Check()方法

<form onsubmit="return Check()"> 懂?

我用IE8测试了一下,提示说 document.register.submit有问题。
你试试把这句话去掉,换成下面这个:

给自己的form写个id号

with(document.getElementById("你的form的id号")) {
method="post";
action="你要提交到的网址";
submit();
}