解决方法是使用Javascript进行多项操作。 我在http://www.codeproject.com/KB/scripting/multiact.aspx上发现了这个。下面的代码:
<form name=Form1 action= "login1.php" method=post>
Username <input type="text" name="username">
Password <input type="password" name="password">
<input type="submit" value="Send" name="button1"
onclick="return OnButton1();">
<script language="javascript">
<!--
function OnButton1()
{
document.Form1.action = "login2.php" // First target
document.Form1.target = "iframe1"; // Open in a iframe
document.Form1.submit(); // Submit the page
document.Form1.action = "page3.php" // Second target
document.Form1.target = "iframe2"; // Open in a iframe
document.Form1.submit(); // Submit the page
return true;
}
-->
</script>
<div style="visibility:hidden">
<iframe NAME="iframe1" WIDTH="40" HEIGHT="40"></iframe>
<iframe NAME="iframe2" WIDTH="40" HEIGHT="40"></iframe>
</div>
一个I帧可以指向谷歌的形式,并且可以指向自己的PHP文件,可以处理的数据(即发送电子邮件的人)。这样做也可以让您处理“谢谢”页面,而不是将它们发送到Google的谢谢页面。