HTML DOM createPopup() Methode

Definition und Verwendung

Das createPopup() Methode wird verwendet, um ein Pop-up-Fenster zu erstellen.

Syntax

window.createPopup()

Beispiel

<html>
<head>
<script type="text/javascript">
function show_popup()
{
var p=window.createPopup()
var pbody=p.document.body
pbody.style.backgroundColor="grün"
pbody.style.border="solide schwarz 1px"
pbody.innerHTML="Das ist ein Pop-up! Klicken Sie außerhalb, um zu schließen."
p.show(150,150,200,50,document.body)
}
</script>
</head>
<body>
<button onclick="show_popup()">Erstellen Sie ein Pop-up!</button>
</body>
</html>