JS can implement pop-up dialog box, this article is mainly to share with you PHP and JS implementation pop-up dialog box instance, I hope to help everyone.
1. PHP Popup dialog box
Popup dialog box <?phpecho "<script language=\" javascript\ ">alert (\" Hello \ ");</script>";? >//Close the current page echo "<script> window.self.close (); </script>";
2. If you want to return to the original page after the PHP popup dialog box can be written
<?phpecho "<script language=\" javascript\ ">\r\n"; echo "alert (\" Hello "); \ r \ n"; echo "history.back (); \ r \ n"; echo "</script>"; exit; >
3. If you need a php pop-up dialog box and replace the original page with a new page (change the current history), the original page can be written like this
<?phpecho "<script language=\" javascript\ ">\r\n"; echo "alert (\" Hello \ "); \ r \ n"; echo "location.replace (\" http ://www.asm32.net/\ "); \ r \ n"; Modify the Web address echo "</script>"; exit; >