<?php
header("Content-type: text/html; charset=utf8");
?>
<iframe name="testIframeName" style="display:none;"></iframe>
<form target="testIframeName" method="post" action="formAction.php">
<input type="text" name="username"/>
<input type="password" name="password"/>
<input type="submit" value=" 提 交 " />
header("Content-type: text/html; charset=utf8");
?>
<iframe name="testIframeName" style="display:none;"></iframe>
<form target="testIframeName" method="post" action="formAction.php">
<input type="text" name="username"/>
<input type="password" name="password"/>
<input type="submit" value=" 提 交 " />
</form>
<?php
$user=$_POST['username'];
$pass=$_POST['password'];
if($user=='an'&&$pass=='123')
echo "<script>alert(登录成功....');</script>";
?>