asp中要实现点击一个按钮转到另一个网页有几种方法实现?

就是按下一个BUTTON,转到另一个网页,一共有哪些方式实现?
我只知道onclick="location.href='XXX.htm'"
另外还有怎么样按下后在原窗口里转倒另一页面,如何实现按下后打开一个新的浏览器来转到新页面。

谢谢

第1个回答  推荐于2016-09-19
onclick="window.open('xxx.asp',target='_self');"
<a href="xxx.asp" target="_blank"><input type="button" value=xxx></a>
<a href="" onclick="window.open('xxx.asp',target='_self');"
<input type="button" value=xxx></a>

按钮动作不一定是提交表单,如:
<input type="submit" name="button" id="button" value="提交" />
<input type="button" name="button2" id="button2" value="按钮"/>
前者的作用是提交表单,点击后提交到form的action属性指定的处理页面上
后者必须人为地指定动作,否则没有意义,因此可以加上:
onclick="window.location.href='xxx.htm'"
点击后转到xxx.htm
第2个回答  2006-11-22
表单实现

<form action="new.asp" method="post" name="form1" target="_self" id="form1">
<input type="submit" name="Submit" value="提交" />
</form>

表单加JS实现
<script language="javascript">
function func(){
document.form1.action="new.asp";
document.form1.submit();
}
</script>

<form action="" name="form1" target="_blank">

<input type=button value="提交" onclick="func();">
</form>
要在本窗口打开,修改target="_blank"为target="_self"
第3个回答  推荐于2018-02-27
onclick="window.open('xxx.asp',target='_self');"
<a href="xxx.asp" target="_blank"><input type="button" value=xxx></a>
<a href="" onclick="window.open('xxx.asp',target='_self');"
<input type="button" value=xxx></a>本回答被提问者和网友采纳
第4个回答  2015-06-25
1、a标签,背景图按钮,直接点击跳转链接href="xxx.asp"
2、js的onclick="location.href='xxx.asp'"
基本都是采用这2种方式跳转的
第5个回答  2006-11-22
<a href="" onclick="window.open('in.asp',target='_blank');"
按钮</a>
相似回答