submit()之后,到了另外的一个页面,那一个页面没有了location.href='',肯定不行了.
这两个肯定不能在同时达到要求进行执行.可以把location.href="asdgasg.html"改成
window.open像下面这样
window.open("test.html");
document.formname.submit();
这两个肯定不能在同时达到要求进行执行.可以把location.href="asdgasg.html"改成
window.open像下面这样
window.open("test.html");
document.formname.submit();
<form action='1.php'>
1.php
<?php
header("location:2.php");
?>
<input type='button' onclick=“document.form.submit();this.disabled">
一提交就disabled按钮
然后在处理提交的页面中设置一个session或cookie变量确认已经提交,处理完再转向。