表单提交给本页,如何在另一页也能接到变量。

ashen219 2006-02-09 03:57:05
表单提交给本页,如何在另一页也能接到变量。


如:XXX.asp
form name="form1" method="post" action="XXX.asp">
<input type="text" name="record" value="">
<input type="submit" name="submit" value="提交">
</form>

另一页 YYY.asp
<%
strrecord=request("record")
%>

用JScript应该怎样写呢?

各位帮帮忙!
谢谢!
...全文
124 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
ashen219 2006-02-09
  • 打赏
  • 举报
回复
搞定。谢谢!
ashen219 2006-02-09
  • 打赏
  • 举报
回复
JS应该怎么做,请给给些参考参考。
charden 2006-02-09
  • 打赏
  • 举报
回复
xxx.asp

<script language=javascript>
function onsumbit_form1()
{
document.form1.target='_blank';

document.form1.action='xxx.asp';
document.form1.submit();

document.form1.action='yyy.asp';
document.form1.submit();

}
</script>

<form name="form1" method="post" onsumbit="onsumbit_form1()">
<input type="text" name="record" value="111">
<input type="submit" name="submit" value="提交">
</form>

yyy.asp

<%
strrecord=request("record")
response.write strrecord
%>
  • 打赏
  • 举报
回复
先用xmlhttp提交到别的页后

然后JS来提交本来表单
tokilcoom 2006-02-09
  • 打赏
  • 举报
回复
感觉可以用session保存一下变量
ashen219 2006-02-09
  • 打赏
  • 举报
回复
我不提交给YYY.asp
只提交给XXX.asp
wangyingdong 2006-02-09
  • 打赏
  • 举报
回复
应该是这样

xxx.asp

<form name="form1" method="post" action="yyy.asp">
<input type="text" name="record" value="111">
<input type="submit" name="submit" value="提交">
</form>

yyy.asp

<%
strrecord=request("record")
response.write strrecord
%>
wangyingdong 2006-02-09
  • 打赏
  • 举报
回复
xxx.asp

<form name="form1" method="post" action="XXX.asp">
<input type="text" name="record" value="111">
<input type="submit" name="submit" value="提交">
</form>

yyy.asp

<%
strrecord=request("record")
response.write strrecord
%>

28,406

社区成员

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

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