Here we use the createPopup() method which is used to create the Pop-Up Window
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function Show()
  5. {
  6. var x = window.createPopup();
  7. var y = x.document.body;
  8. y.style.border = "solid blue 1px";
  9. y.style.backgroundColor = "Red";
  10. y.innerHTML = "My Name is Mahak.";
  11. x.show(150, 150, 200, 50, document.body);
  12. }
  13. </script>
  14. </head>
  15. <body><button onclick="Show()">Show pop-up!</button></body>
  16. </html>