现在我到了这里是脚本提醒“你已经成功登录”后,正确的登录信息后填写表格在index.php ...Javascript Alert Box in PHP。删除灰色/白色背景当警报POPS向上
在我check_login.php这些都是脚本... 到目前为止
if($count['user_type']== "agent"){
session_register("myusername");
session_register("mypassword");
echo '<script type="text/javascript">window.onload = function() {
alert("You have logged in successfully!\n");}</script>';
echo "<meta http-equiv=\"refresh\" content=\"0;URL=pages/agent.php\">";
exit();
//header("location:pages/agent.php");
}
if ($count['user_type']== "moderator"){
session_register("myusername");
session_register("mypassword");
header("location:pages/moderator.php");
}
else {
echo "<script type='text/javascript'>alert('Invalid Login! Please Try Again!');</script>";
echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.php\">";
}
警告框完全是工作,但..我希望它弹出,而背景仍然是可见的(的index.php),点击后好的...它会重定向到一个页面,从我的代码 - >到“agent.php”
我用
echo "<meta http-equiv=\"refresh\" content=\"0;URL=pages/agent.php\">";
重定向成功登录的用户..
但重定向过程之前......我希望用户看到一个警告框。
我的观点是,如何让背景仍然可见时自动弹出警告框。我注意到,在Firefox中,它是在灰色BG,而在Chrome等等... BG是白色的...
请帮助。在此先感谢:|
jquery-ui对话框会更简单操作.. – Gntem 2012-07-21 18:04:18