How to close a window

Description

window.close() closes the window.

Example


<!DOCTYPE HTML> 
<html> 
<!-- w  w  w  . j av a  2 s.c om-->
    <body> 
        <script> 
            //window.close();  

        </script> 
    </body> 
</html>

Click to view the demo

Uncomment out the statement to see the action.





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window