Easy Tutorial
❮ Met Element Getattribute Prop Style Lineheight ❯

createPopup() Method


Definition and Usage

The createPopup() method is used to create a popup window.

Syntax


Browser Support

Note: The createPopup() method is only supported by IE browsers; other browsers do not support it.


Example

Create a popup window:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>tutorialpro.org(tutorialpro.org)</title>
<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 popup! Click outside the popup to close it.";
    p.show(150,150,200,50,document.body);
}
</script>
</head>
<body>
    
<button onclick="show_popup()">Show Popup!</button>
<p><b>Note:</b> The createPopup() method only works in IE!</p>
    
</body>
</html>

❮ Met Element Getattribute Prop Style Lineheight ❯