<form action=login method=post>
     <table align=center>
     <tr>
     <td>账号:</td>
     <td><input type=text name=id /></td>
     </tr>
     <tr>
     <td>密码:</td>
     <td><input type=password name=pwd /></td>
     </tr>
     <tr>
     <td colspan=2 align=center><input type=submit value="登陆" />
     <input type=button  value="注册" /></td>
     </tr>
     </table>
    </form>
这是我JSP登陆界面的表单  如何能点击  "注册"的按扭 跳到 ADD.JSP这个界面

解决方案 »

  1.   

    可以使用onclick事件调用JavaScript来跳转页面
      

  2.   

    在<input type="button" value="注册表" onclick="regist()">
    JS应该类似这样
     function regist(){
       try{
        with(document.forms[0]){
           ^^^^^(为你想不为空或者其他限制条件)
          submit();  
    }
       }catch(e){
        alert(e.message);
     }
    }
      

  3.   

    表单的action为你想要跳到地方。
      

  4.   

    加入以下代码就OK:
    <input type="button" value="注册表" onclick="regist()">
    <script type="text/javascript">
     function regist(){
         window.open(add.jsp);
    }
    </script>
      

  5.   

    <input type="button" onclick="window.open('ADD.JSP');" value="用户注册"/>
      

  6.   

    你可以把button按钮换成个图片,设置个超链接就行了
      

  7.   

    第一种:
        <script language="javascript" type="text/javascript">
               window.location.href="login.jsp?backurl="+window.location.href; 
        </script>第二种:
        <script language="javascript">
    alert("返回");
    window.history.back(-1);
       </script>第三种:
       <script language="javascript">
    window.navigate("top.jsp");
      </script>第四种:
       <script language="JavaScript">
              self.location='top.htm';
       </script>第五种:
       <script language="javascript">
              alert("非法访问!");
              top.location='xx.jsp';
       </script>
      

  8.   

    我知道你问什么了,加FORM中加入action值就行了
    <form  action="add_words_save.jsp(跳转的页面)" method=post>
      

  9.   

    给个完整的form<form name="login" action="login_do.jsp" method="post">
        <p>用户名:<input name="username" size="20" type="text"></p>
        <p>密码:<input name="password" size="20" type="password"></p>
        <P><input  type="submit" value="登录"><input  type="reset" value="重置"></P>
    </form>