Search w3schools.com:

SHARE THIS PAGE

Window createPopup() Method

Window Object Reference Window Object

Definition and Usage

The createPopup() method is used to create a pop-up window.

Syntax

window.createPopup()


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Note: The createPopup() method is an IE-only method, and does not work in other browsers!


Example

Example

Create a pop-up window:

<html>
<head>
<script>
function show_popup()
{
var p=window.createPopup()
var pbody=p.document.body
pbody.style.backgroundColor="lime"
pbody.style.border="solid black 1px"
pbody.innerHTML="This is a pop-up! Click outside to close."
p.show(150,150,200,50,document.body)
}
</script>
</head>
<body>

<button onclick="show_popup()">Create pop-up!</button>

</body>
</html>

Try it yourself »


Window Object Reference Window Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]