请教关于普通button跳转页面的问题

sswalloww 2004-11-26 03:00:02
两个按钮,其中一个是submit在表单提交跳转到action所指的页面,另一个是button,怎么样按下此按钮时跳转到其他asp页面?请大家帮忙!
...全文
1715 12 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
lynchy 2004-11-28
  • 打赏
  • 举报
回复
假如有一个翻页的按钮,翻到最后一页,该怎么处理呢?
smmi 2004-11-28
  • 打赏
  • 举报
回复
如果要提交的话可以这样写
<input name="Submit2" type="submit" value="提交到另一页面"onClick="this.form.action='2.asp';this.form.submit()">
sswalloww 2004-11-28
  • 打赏
  • 举报
回复
谢谢各位的帮助!^_^
patchclass 2004-11-26
  • 打赏
  • 举报
回复
form1.action="你要提交的后台页面";
form1.target="_blank" '新窗口
form1.submit(); ''提交
alianasia 2004-11-26
  • 打赏
  • 举报
回复
晕,,,看清楚楼主提的问题,

要的就是跳转,location.href就可以了.
hhjjhjhj 2004-11-26
  • 打赏
  • 举报
回复
同意kendo7()
location方法不行的!!,这种方法只能跳转,不会提交。
yb2008 2004-11-26
  • 打赏
  • 举报
回复
location.href='a.asp'
life360 2004-11-26
  • 打赏
  • 举报
回复
<input type="button" onclick="location.href='xxxx.asp'">
zhhl 2004-11-26
  • 打赏
  • 举报
回复
up
cdsun 2004-11-26
  • 打赏
  • 举报
回复
<form>
<input type="button" value="跳转" onclick="location.href='aim.asp'">
</form>
kendo7 2004-11-26
  • 打赏
  • 举报
回复
<script language="javascript">
function gourl1(){
document.all.form1.action="1.asp";
document.all.form1.submit();
}
function gourl2(){
document.all.form1.action="2.asp";
document.all.form1.submit();
}
</script>
<body>

<form name="form1" method="post">
<input name="name1" type="text">
<input type="button" onClick="gourl1()" value="提交1">
<input type="button" onClick="gourl2()" value="提交2">
</form>
uGain 2004-11-26
  • 打赏
  • 举报
回复
<form>
<input type="text" name="field1">
<input type="submit">
<input type="button" value="跳转" onclick="location.href='aim.asp?field1='+document.all.field1.value">
</form>

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧