初学着按钮提交方式
程序员文章站
2022-04-01 11:59:13
...
1、一个from两个按钮提交
<script>
function save(){
document.form1.action="right.asp";
document.form1.submit();
}
function send(){
document.form1.action="sendtaskook.asp";
document.form1.submit();
}
</script>
<form name="form1">
<input type="button" name="btn1" value="发送" onclick="send();">
<input type="button" name="btn2" value="保存" onclick="save();">
</form>
2、一个按钮提交俩from
function save{
document.retireeForm.action='submitRetireeAdd.action';
document.retireeForm.submit();
document.resumeForm.action='submitResumeAdd.action';
document.resumeForm.submit();
}
<form name="retireeForm"></from>
<from name="form1"></from>
<input type="resumeForm" name="btn1" value="发送" onclick="save();">
<script>
function save(){
document.form1.action="right.asp";
document.form1.submit();
}
function send(){
document.form1.action="sendtaskook.asp";
document.form1.submit();
}
</script>
<form name="form1">
<input type="button" name="btn1" value="发送" onclick="send();">
<input type="button" name="btn2" value="保存" onclick="save();">
</form>
2、一个按钮提交俩from
function save{
document.retireeForm.action='submitRetireeAdd.action';
document.retireeForm.submit();
document.resumeForm.action='submitResumeAdd.action';
document.resumeForm.submit();
}
<form name="retireeForm"></from>
<from name="form1"></from>
<input type="resumeForm" name="btn1" value="发送" onclick="save();">
上一篇: jQuery的end()方法使用详解_jquery
下一篇: ps全称是photoshop吗?
推荐阅读