How to use createPopup() Method in
JavaScript
window.createPopup()
Example:
Out Put:
Click on Popup window button.
How to use open() Method in JavaScript
Example:
Out Put:
- The createPopup() method is used to create a pop-up window.
- Its only support the Internet Explorer
window.createPopup()
Example:
<html>
<body>
<script language="JavaScript">
var pop_window;
function new_window() {
pop_window = window.createPopup();
pop_window.document.body.style.backgroundColor = 'red';
pop_window.show(100,100,100,200,document.body);
}
</script>
<input type="button" value="Popup Window" onclick="new_window();">
</body>
</html>
|
Click on Popup window button.
How to use open() Method in JavaScript
Example:
<html>
<head>
<script type="text/javascript">
function new_window()
{
myWindow=window.open('','','width=200,height=100');
myWindow.document.write("<p>This is new window</p>");
}
</script>
</head>
<body>
<input type="button" value="Open New Window" onclick="new_window()" />
</body>
</html>
|
No comments :
Post a Comment