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

navigate method (window)

Browser support:
Loads the document at the specified URL into the current window.
This method is equivalent to the cross-browser assign method, use that instead.


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


Required. String that specifies the location of the document to load.

Return value:

This method has no return value.

Example HTML code 1:

This example illustrates the use of the navigate method:
    <script type="text/javascript">
        function LoadNewPage () {
            if (window.navigate) {
                window.navigate ("newLocation.htm");
            else {
                location.assign ("newLocation.htm");
    <button onclick="LoadNewPage ()">Load new document</button>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content