Search This Blog

Thursday, 6 September 2012

Practical-9) Write a JavaScript to show a pop up window with a message Hello and background color lime and with solid black border.


Filename-js9.html

<html>
<head>
<title> Java Practical 9 </title>
<script language="javascript">
         
          function popup()
          {
          //open("js8.html");
                   var pu =window.createPopup();
                   //var ref = pu.documetn.body; //create reference ...
                   pu.document.body.style.backgroundColor="#AAFFFF";
                   pu.document.body.style.border="solid black"
                   pu.show(50,50,200,160,document.body);
                   pu.document.body.innerHTML="Welcome to Apple.com";
          }
</script>
</head>
<body>
<form>
<input type="button" name="bt" value="show pop-up" onClick="popup()">
</form>
</body>
</html>

Output
Note: pop-up windows generate on IE.

No comments:

Post a Comment