在jsp中怎么把按钮做成一个超链接

来源:互联网 发布:手机短信软件不见了 编辑:程序博客网 时间:2024/04/30 11:46
№ <input type="button" value="注册" onClick="window.location.href='register.jsp'"> 
(在当前页面打开reg.jsp) 

№ <input type="button" value="注册" onclick="javascript:location.href='reg.jsp'"> 
(在当前页面打开reg.jsp) 

№ <input type="button" value="注册"  onclick="window.open('reg.jsp')"> 
(在新的页面打开reg.jsp) 

№ <form   name=ok   action="xx.jsp"   method=post>  
    <input type="button" value="注册" onClick="goo(a,b)">  
   <input   type=hidden   name=xx>  
   <input   type=hidden   name=yy>  
   </form>  
   
   <script   language="javascript">  
    function   goo(a,b){  
       xx.value=a;  
       yy.value=b;  
       formname.submit();  
    }  
    </script>

0 0