<form name="regstep1" method="post" action="registry2.php"  onsubmit="return check()"> <input type="submit" class="box1" name="submit2" value="下一步" > 
改上面2个地方看看

解决方案 »

  1.   

    <!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>无标题文档 </title> 
    <!-- 
    <script language="javascript" type="text/javascript"> 
        function check() //检查FORM内所填写的信息是否有误 

        if(document.form1.username.value == "") 

        alert("未输入帐号"); 
    return false; 

    if(document.regstep1.userpass.value == "") 

        alert("请勿使用空白密码") 
    return false; 

    if(document.regstep1.userpass.value != document.regstep1.userpass2.value) 

        alert("两次输入的密码不同"); 
    return false; 

    if(document.regstep1.pass_ans.value == "") 

        alert("未输入密码提示答案"); 
    return false; 
    } document.regstep1.submit(); 
    } function Checkname() 

        var Name = document.regstep1.username.value; 
    //打开一个检查会员名称是否重复的新窗口 
    window.open("uniquecheck.php?name="+Name,"check","width=300,height=10,status=0,scrollbars=0,resizable=1,menubar=0,toolbar=0,location=0"); 

    </script>!--> 
    </head> <body>
    <form name="regstep1" method="post" action="registry2.php" onsubmit="return check()"> > 
    <br /> 
        <table width="446" border="1" bordercolor="#000000" align="center" cellspacing="0"> 
        <tr> 
        <td> 
        <table width="440" border="0" height="220" align="center" bgcolor="#eeeeee" cellspacing="0" cellpadding="0"> 
        <tr> 
        <td colspan="2" bgcolor="#fff000"> 
        <div align="center"> <img src="images/1.gif" width="298" height="41" /> </div> 
    </td> 
    </tr> 
    <tr> 
        <td> 
        <div align="center">帐    号 </div> 
    </td> 
    <td height="18"> 
        <div align="center"> 
        <input type="text" name="username" size="15" />                                 <input onClick="javascript:Checkname()" type="button" value="检查帐号" name="button" /> 
    </div> 
    </td> 
    </tr> 
    <tr> 
        <td bgcolor="#fff000"> 
        <div align="center">密    码 </div> 
    </td> 
    <td height="6" bgcolor="#fff000"> 
        <div align="center"> 
        <input type="password" name="userpass" size="20" /> 
    </div> 
    </td> 
    </tr> 
    <tr> 
        <td> 
        <div align="center">密 码 确 认 </div> 
    </td> 
    <td height="2"> 
        <div align="center"> 
        <input type="password" name="userpass2" size="20" /> 
    </div> 
    </td> 
    </tr> 
    <tr> 
        <td bgcolor="#fff000"> 
        <div align="center">密 码 提 示 </div> 
    </td> 
    <td height="2" bgcolor="#fff000"> 
        <div align="center"> 
        <select name="pass_rem"> 
        <option value="0">你家宠物的名字 </option> 
    <option value="1">你最想去的国家 </option> 
    <option value="2">你最喜欢的运动 </option> 
    <option value="3">你最讨厌的食物 </option> 
    <option value="4">你在家常做什么 </option> 
    <option value="5">你最爱看的电影 </option> 
    </select> 
    </div> 
    </td> 
    </tr> 
    <tr> 
        <td> 
        <div align="center">答    案 </div> 
    </td> 
    <td height="2"> 
        <div align="center"> 
        <input type="text" name="pass_ans" size="20" /> 
    </div> 
    </td> 
    </tr> 
    <tr> 
        <td colspan="2" bgcolor="#fff000"> 
        <div align="center"> 
        <input type="reset" name="submit" value="清除重填" /><input type="submit" class="box1" name="submit2" value="下一步"> </div> 
    </td> 
    </tr> 
    </table> 
    </td> 
    </tr> 
    </table> 
    </form> 
    </body> 
    </html>