当点击提交登录的时候,如果登录失败,跳出对话框php代码: echo "<script language=javascript>alert('密码错误');history.back();</script>";