replace

HTML (DHTML)

replace Method

Internet Development Index

Replaces the current document by loading another document at the specified URL.

Syntax

location.replace(sURL)

Parameters

sURL Required. String that specifies the URL to insert into the session history.

Return Value

No return value.

Remarks

When a document is replaced, it is also removed from the history object. Moreover, the user interface navigation methods, such as the Back and Forward buttons, will no longer access the URL.

Standards Information

There is no public standard that applies to this method.

Applies To

location