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

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

谢谢
展开
 我来答
百度网友01b12fe7d
推荐于2016-09-19 · TA获得超过658个赞
知道大有可为答主
回答量:2649
采纳率:63%
帮助的人:620万
展开全部
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
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
tytyjas
2006-11-22 · TA获得超过379个赞
知道小有建树答主
回答量:278
采纳率:0%
帮助的人:262万
展开全部
表单实现

<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"
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友fc6539f05
推荐于2018-02-27 · TA获得超过112个赞
知道答主
回答量:221
采纳率:0%
帮助的人:0
展开全部
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>
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
eadio
2015-06-25 · TA获得超过1610个赞
知道小有建树答主
回答量:962
采纳率:80%
帮助的人:1002万
展开全部
1、a标签,背景图按钮,直接点击跳转链接href="xxx.asp"
2、js的onclick="location.href='xxx.asp'"
基本都是采用这2种方式跳转的
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
匿名用户
2006-11-22
展开全部
<a href="" onclick="window.open('in.asp',target='_blank');"
按钮</a>
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(5)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式