THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Window createPopup() Method

Window Object Reference Window Object

Example

Create a pop-up window:

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)
}

Definition and Usage

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

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

Note: As of Internet Explorer 11, the createPopup() method is no longer supported.


Syntax

window.createPopup()

Technical Details

Return Value: The popup window object

Window Object Reference Window Object