如何让一个按钮提交两个表单

guanbird 2008-02-27 10:48:23
如上。
例如:a.asp b.asp c.asp
a.asp是 第一个文件
里面的form action 为b.asp,c.asp
即:a.asp的内容 按一个提交按钮,同时提交到 b.asp,c.asp里面。

呵呵,不知道我描述的清楚不。

应该怎么做呢?谢谢大家啊
...全文
292 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
这种进阶初级的!
  • 打赏
  • 举报
回复
http://topic.csdn.net/u/20080110/19/7cb462f1-cac6-4c28-848e-0a879f4fd642.html

结帖方法

呵呵,很简单的!
guanbird 2008-02-28
  • 打赏
  • 举报
回复
7楼 8楼的回复很好 ,谢谢啊

怎么给分啊?
guanbird 2008-02-28
  • 打赏
  • 举报
回复
刚开始时操作错了,原来是20分,结果增加到了120分

这分数全散出去了》。。

下次一定注意操作....
cnchart 2008-02-27
  • 打赏
  • 举报
回复
我明白你要的目的了,你是想一个表单提交的时候同时给两个页面处理吧

<form name="form1" target="_blank" action="abc.htm">
</form>

<input type="button" onclick="submit_form();" value="提交">
<script language="javascript">
function submit_form(){
document.form1.submit();
document.form1.action="def.htm";
document.form1.submit();
}
</script>
md5e 2008-02-27
  • 打赏
  • 举报
回复
a-> b-> c
效果是一样的
先提交到b
b的数据处理完
把数据写与隐含域
用js提交给C
v_rcvname=Request.Form("v_rcvname")
<input name="v_rcvname" type="hidden" id="v_rcvname" value="<%=v_rcvname%>">
...
...
...
<script>
document.myform.submit();
</script>
guanbird 2008-02-27
  • 打赏
  • 举报
回复
呵呵,加粗字 在增加c.asp的 form 应该怎么做呢
guanbird 2008-02-27
  • 打赏
  • 举报
回复


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>

</head>

<body topmargin="0" leftmargin="0" rightmargin="0">
<center> <form id="form1" name="form1" method="post" action="b.asp" onSubmit="return submitForm()">
[b]现有b.asp了,在增加c.asp,应该怎么做呢?[b]
<table width="648" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="68" align="center"> </td>
</tr>
<tr>
<td height="30" align="left" bgcolor="#efefef"><br />

<br />
   姓名:
<input name="v_rcvname" type="text" class="editbox" value="<%=v_rcvname%>" size="12" maxlength="8" />
   地址:
<input name="v_rcvaddr" type="text" class="editbox" value="<%=v_rcvaddr%>" />
<br />
<br />
   电话:
<input name="v_rcvtel" type="text" class="editbox" value="<%=v_rcvtel%>" size="12" maxlength="11" />
   邮编:
<input name="v_rcvpost" type="text" class="editbox" value="<%=v_rcvpost%>" />
<br />
 <br />
   医院名称:
<input name="v_orderstatus" type="text" class="editbox" value="<%=v_orderstatus%>" size="30" maxlength="28" />
<br />
<br />
   电子信箱:
<input name="v_ordername" type="text" class="editbox" value="<%=v_ordername%>" size="20" maxlength="18" />
<br /></td>
</tr>

<tr>
<td height="48" align="center"><label>
<input name="Submit" type="submit" class="button" value="下一步" />
</label>
<label>  </label></td>
</tr>
</table>
</form>
</center>
</body>
</html>
cnchart 2008-02-27
  • 打赏
  • 举报
回复
<form name="form1" target="_blank" action="abc.htm">
</form>
<form name="form2" target="_blank" action="def.htm">
</form>
<input type="button" onclick="submit_form();" value="提交">
<script language="javascript">
functioni submit_form(){
document.form1.submit();
document.form2.submit();
}
</script>
wpjwll 2008-02-27
  • 打赏
  • 举报
回复
清楚!
md5e 2008-02-27
  • 打赏
  • 举报
回复
不能同时提交
但可以实现分次提交

a->b->c
wpjwll 2008-02-27
  • 打赏
  • 举报
回复
up

28,391

社区成员

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

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