调试出错!!
这是一个用户注册页面:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ include file="include.inc"%>
<%@ include file="trans.jsp"%>
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="error.jsp" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><LINK
href="hellking.css" type=text/css rel=stylesheet>
<body>
<table width=88% border="1" height="100%" cellpadding="0" cellspacing="0" align="left" bordercolor="#000080" class=tablebody2>
<tr>
<td>
<script language="javascript">
<!-- Begin validation script
function checkId(o){
if(o.value!="")
for(i=0;i<o.value.length;i++){
if(!((o.value.charCodeAt(i)>=48&&o.value.charCodeAt(i)<=57)||(o.value.charCodeAt(i)>=65&&o.value.charCodeAt(i)<=90)||(o.value.charCodeAt(i)>=97&&o.value.charCodeAt(i)<=122)))
{
alert("ID只能由字母和数字组成!");
o.focus();
break;
}
}
}
function checkConfirm(o1,o2){
if(o2.value!=""){
if(o2.value!=o1.value){
alert("两次输入的密码必须相同!");
o1.focus();
}
}
}
function checkform2(){
if(document.form2.name.value==""){
alert("请输入姓名!");
return false;
}
else if(document.form2.pinyin.value==""){
alert("请输入姓名的拼音!");
return false;
}
else if(document.form2.no.value==""){
alert("请输入员工号码!");
return false;
}
else if(document.form2.id.value==""){
alert("请输入用户名!");
return false;
}
else if(document.form2.psw.value==""){
alert("请输入密码!");
return false;
}
else if(document.form2.repsw.value!=document.form2.psw.value){
alert("请正确输入密码");
return false;
}
else
return true;