同一个form提交到两个页面?

monkeyhjl 2004-03-25 06:50:34
<script language="JavaScript">
function save(){
form1.action = "FB_ModifJXCF1.asp"
form1.submit()
}
function next(){
form1.action = "FB_ModifJXCF2.asp"
form1.submit()
}

}
</script>
<form name="form1" method="post" onSubmit="return checkData()">
<input type="hidden" name="id" value="<%=id%>">
<input type="button" name="button" value="保存修改" onClick="return save()">
<input type="button" name="submit" value="下一步" onClick="return next()">
这样写对不对呀?网页上报一个缺少对象的错误,是什么原因哦?
...全文
42 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
bullion 2004-03-26
  • 打赏
  • 举报
回复

<script language="JavaScript">
function save(){
form1.action = "FB_ModifJXCF1.asp"
form1.submit()
return true;
}
function next(){
form1.action = "FB_ModifJXCF2.asp"
form1.submit()
return true;
}
</script>
改为
<script language="JavaScript">
function save(){
document.form1.action = "FB_ModifJXCF1.asp"
document.form1.submit()
return true;
}
function next(){
document.form1.action = "FB_ModifJXCF2.asp"
document.form1.submit()
return true;
}
</script>


monkeyhjl 2004-03-25
  • 打赏
  • 举报
回复
to:bullion()
加了还是不行。
bullion 2004-03-25
  • 打赏
  • 举报
回复
这就对了
在form1.submit()前加上document.
也就是document.form1.submit()
monkeyhjl 2004-03-25
  • 打赏
  • 举报
回复
去了"}",报错的地方是:form1.submit()
说对象不支持这个方法。
wcqgm 2004-03-25
  • 打赏
  • 举报
回复
<script language="JavaScript">
function save(){
form1.action = "FB_ModifJXCF1.asp"
form1.submit()
return true;
}
function next(){
form1.action = "FB_ModifJXCF2.asp"
form1.submit()
return true;
}

}
</script>
<form name="form1" method="post" onSubmit="return checkData()">
<input type="hidden" name="id" value="<%=id%>">
<input type="button" name="button" value="保存修改" onClick="return save()">
<input type="button" name="button" value="下一步" onClick="return next()">
</form>
wzwlin108 2004-03-25
  • 打赏
  • 举报
回复
楼上的朋友真仔细
bullion 2004-03-25
  • 打赏
  • 举报
回复
是不是后面多了一个"}"
monkeyhjl 2004-03-25
  • 打赏
  • 举报
回复
我想知道我的方法这么写对不对呀?
QQgenie 2004-03-25
  • 打赏
  • 举报
回复
高手告诉我的:

<form target="_blank" action='1.asp' method=post> target="_blank" 不能省
<input type=submit onclick="submit();action='http://aaa.com/b.asp'"> "'"引号很重要.
</form>
monkeyhjl 2004-03-25
  • 打赏
  • 举报
回复
checkData()在<script language="JavaScript"></script>里面呀!
我没有写出来。
luojx 2004-03-25
  • 打赏
  • 举报
回复
checkData()函数????

28,390

社区成员

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

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