HTML | Window createPopup() Method
The createPopup() method in html window is used to create a pop-up window.
Syntax:
window.createPopup()
Example:
<html> <head> <title> DOM createPopup() Method </title> <style> h1 { color: green; } </style> </head> <head> <script type="text/javascript"> function show_popup() { var pop = window.createPopup() var popbody = pop.document.body popbody.style.backgroundColor = "lime" popbody.style.border = "solid black 1px" popbody.innerHTML = "I am the pop-up, Click outside to close." pop.show(150, 150, 200, 50, document.body) } </script> </head> <body> <center> <h1> GeeksforGeeks </h1> <button onclick="show_popup()"> pop-up! </button> </center> </body> </html> |
chevron_right
filter_none
Output:

Note: The Window createPopup() Method works before Internet Explorer 11.
Supported browser:
- Google Chrome: NO
- Mozilla Firefox: NO
- Edge: NO
- Opera: NO
- Safari: NO
Recommended Posts:
- HTML | DOM Window stop() Method
- HTML | Window moveTo() Method
- HTML | Window resizeTo() Method
- HTML | Window moveBy() Method
- HTML | Window resizeBy() Method
- HTML | DOM Window btoa() Method
- HTML | Window alert( ) Method
- HTML | Window scrollBy() method
- HTML | Window atob( ) Method
- Javascript | Window Blur() and Window Focus() Method
- HTML | Window name Property
- HTML | Window self( ) Property
- HTML | Window top( ) Property
- HTML | DOM Window defaultStatus Properties
- HTML | DOM Window parent Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : shubham_singh



