You are here: Reference > JavaScript > client-side > HTML DOM > methods > home (window)

home method (window)

Browser support:
Loads the browser's initial home page.

Syntax:

object.home ( );
You can find the related objects in the Supported by objects section below.

Return value:

This method has no return value.

Example HTML code 1:

This example illustrates the use of the home method:
<head>
    <script type="text/javascript">
        function GoHome () {        // Firefox, Opera, Google Chrome and Safari
            if (window.home) {
                window.home ();
            } else {        // Internet Explorer
                document.location.href = "about:home";
            }
        }
    </script>
</head>
<body>
    <input type="button" value="Go home!" onclick="GoHome ();" />
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content