分步注册的表单验证问题
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="workR" scope="page" class="general.ReadPath" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%= new String(workR.returnPath("0").getBytes("ISO-8859-1"),"gbk") %></title>
<script language="javascript" src="public/PopupCalendar.js" ></script>
<script language="javascript" src="js/check.js" ></script>
<script language="javascript" language="javascript" >
//regist_corp.jsp
function checkUser()
{
if(form1.euname.value!=""&form1.euname.value!=null)
{
var euname=document.form1.euname.value;
regpost.location.href="regist_do.jsp?action=checkUser&euname="+euname;
}
}
function checkCode()
{
if(form1.eorgcode.value!=""&form1.eorgcode.value!=null)
{
var eorgcode=document.form1.eorgcode.value;
regpost.location.href="regist_do.jsp?action=checkCode&eorgcode="+eorgcode;
}
}
function show_ds()
{
window.open("public/show_ds.jsp",'','x=100,y=100,scrollbars=yes,width=800');
}
</script>
<script language="javascript" type="text/javascript">
function cregstate(index)
{
var items=document.getElementById("regpanal").childNodes;
for(var i=0;i<items.length;i++)
{
items[i].style.display="none";
}
var index1=index+1;
document.getElementById("reg"+index1).style.display="block";
}
</script>
<body topmargin="0" bottommargin="10">
<table width="962" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" action="regist_do.jsp?action=sub" method="post">
<tr>
<td><img src="images/reg06.jpg" width="600" height="80" /></td>
</tr>
<tr>
<td height="52" background="images/reg01.jpg"><table width="910" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td class="STYLE1">单位用户注册</td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" valign="middle" background="images/reg03.jpg">
</td>
</tr>
<tr>
<td height="30" valign="middle" background="images/reg03.jpg">
<div id="regpanal">
<div id="reg0" style="display:block">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" colspan="2" class="STYLE2"> 创建您的账号</td>
</tr>
<tr>
<td colspan="2" align="center" class="STYLE4"><img src="images/reg05.jpg" width="960" height="10" /></td>
</tr>
<tr>
<td width="30%" height="50" align="right" class="STYLE4">用户名:</td>
<td class="STYLE4"><input name="euname" type="text" id="euname" size="30" maxlength="25" onblur="checkUser()"/>
<font color="#FF0000">*</font>(注:其中标有<font color="#FF0000">*</font>标志为必填项)
<iframe name="regpost" src="about:blank" width="0" height="0" scrolling="no" frameborder="0"></iframe>
<div id="message1"></div></td>
</tr>
<tr>
<td height="50" align="right" class="STYLE4">用户密码:</td>
<td><input name="eupass" type="password" id="eupass" size="33" maxlength="10" />
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="50" align="right" class="STYLE4">确认密码:</td>
<td><input name="eupass1" type="password" id="eupass1" size="33" maxlength="10" />
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="50" align="right" class="STYLE4"> </td>
<td><input name="button1" type="submit" id="button1" onclick="cregstate(1)" value="下一页" /></td>
</tr>
</table>
</div>
</div>
</td>
</tr>
<tr>
<td background="images/reg03.jpg"></td>
</tr>
<tr>
<td><img src="images/reg04.jpg" width="962" height="10" /></td>
</tr>
</form>
</table>
</body>
</html>
上面是我的源码 我想在点击 下一步 按钮的时候 验证我上面的表单 今天有点晕 请高手帮忙 有几个div 我没写 太长了