日期:2014-05-16 浏览次数:20349 次
type=button //就单纯是按钮功能 type=submit //是发送表单
<input type="submit" name="b1" value="提交" onClick="bt_submit_onclick()">
<input type="button" name="b1" value="提交" onClick="bt_submit_onclick()">
onclick="form1.action='a.jsp';form1.submit();"
<form name="form1" method="post" action="http://www.sina.com.cn"> <input type="button" name="Button" value="Button" onClick="submit()"> </form>
<input type="button" name="Button" value="Button" onClick="javascript:windows.location.href="你的url"">
<script language="javascript" type="text/javascript"> function test(){ window.location.href="login.jsp?backurl="+window.location.href; } </script>
<script language="javascript"> function test(){ alert("返回"); window.history.back(-1); } </script>
<script language="javascript"> window.navigate("top.jsp"); </script>
<script language="JavaScript"> function test(){ self.location='top.htm'; } </script>
<script language="javascript"> function test(){ alert("非法访问!"); top.location='xx.jsp'; } </script>