Home > Backend Development > PHP Tutorial > How to pop up a dialog box in PHP, cad does not pop up a dialog box, web page pops up a dialog box code, html clicks to pop up a dialog box

How to pop up a dialog box in PHP, cad does not pop up a dialog box, web page pops up a dialog box code, html clicks to pop up a dialog box

WBOY
Release: 2016-07-29 08:51:15
Original
1738 people have browsed it

The method of popping up a dialog box in PHP is as follows. Generally, a dialog box prompt needs to pop up after submitting information, and then the dialog box can be automatically closed. There are following centralized methods for popping up a dialog box. In fact, they all use the alert() method in JavaScript. Closing the current page after the prompt ends can also be achieved using javascript's Window.self.close().

The exact statement is: echo " <script> window.self.close(); </script> ";

1.php pop-up dialog box
//pop-up dialog box
echo " ";
?>

//Close the current page

echo " <script> window.self.close (); </script> ";
or
print "";
?>
2. If you need php to pop up a dialog box and return to the original page, you can write like this
echo "";
exit;
?>
or
print "";
exit;
?>
3. If necessary After php pops up the dialog box, replace the original page with the new page (replace the current history record). The original page can be written like this
echo "";
exit;
?>
or
print "";
exit;
?>


The above introduces the method of popping up a dialog box in PHP, including the content of the popup dialog box. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template