asp中一个页面怎么提交多个表单
展开全部
可以利用js,如下例:
<script>
function SubmitForms()
{
form1.submit();
form2.submit();
form3.submit();
}
</script>
<form name="form1" action="?" method="post" onSubmit="SubmitForms()">
<input type="submit" value="submit" name="submit">
</form>
<form name="form2" action="?" method="post" onSubmit="SubmitForms()">
<input type="submit" value="submit" name="submit">
</form>
<form name="form3" action="?" method="post" onSubmit="SubmitForms()">
<input type="submit" value="submit" name="submit">
</form>
这样,三个表单,不论提交哪个一个,都会在提交时实行SubmitForms()方法,进而提交其他的几个,达到同时提交多个表单的目的!
<script>
function SubmitForms()
{
form1.submit();
form2.submit();
form3.submit();
}
</script>
<form name="form1" action="?" method="post" onSubmit="SubmitForms()">
<input type="submit" value="submit" name="submit">
</form>
<form name="form2" action="?" method="post" onSubmit="SubmitForms()">
<input type="submit" value="submit" name="submit">
</form>
<form name="form3" action="?" method="post" onSubmit="SubmitForms()">
<input type="submit" value="submit" name="submit">
</form>
这样,三个表单,不论提交哪个一个,都会在提交时实行SubmitForms()方法,进而提交其他的几个,达到同时提交多个表单的目的!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询