Saturday, January 28, 2012

createPopup() Method in JavaScript


    The createPopup() method is used to create a pop-up window.
    Its only support the Internet Explorer.
                       
Syntax: window.createPopup();
 
JavaScript code:
<script language="javascript" type="text/javascript">

    var popWindow;
    function windowFunction() {
        popWindow = window.createPopup();
        popWindow.document.body.style.backgroundColor = 'red';
        popWindow.show(200, 200, 100, 200, document.body);
   

</script>
 
HTML Code:
<input type="button" value="Popup Window!" onclick="this.windowFunction();">

No comments: