方法一:
echo "<script>alert('提示内容')</script>";
方法二:
echo '<script language="JavaScript">;alert("这是"
;location.href="index.htm";</script>;';
里面的location.href="index.htm"表示你点击消息框的确定按钮后将要转向的页面。如果不用去掉就可!

里面的location.href="index.htm"表示你点击消息框的确定按钮后将要转向的页面。如果不用去掉就可!
转自:http://chanjuanemail.blog.163.com/blog/static/8180159820088190448141/