Pop-Up Window in Javascript

Here we use the createPopup() method which is used to create the Pop-Up Window

 <html>

<head>

<script type="text/javascript">

function Show()

{

var x=window.createPopup();

var y=x.document.body;

y.style.border="solid blue 1px";

y.style.backgroundColor="Red";

y.innerHTML="My Name is Mahak.";

x.show(150,150,200,50,document.body);

}

</script>

</head>

<body>

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

</body>

</html>

Ebook Download
View all
Learn
View all