Location assign() Method
Load a new document:
Try it yourself »
Definition and Usage
The assign() method loads a new document.
The difference between this method and replace(), is that replace() removes the URL of the current document from the document history, meaning that it is not possible to use the "back" button to navigate back to the original document.
The assign() method is supported in all major browsers.
|URL||String||Required. Specifies the URL of the page to navigate to|
|No return value.|
Thank You For Helping Us!
Your message has been sent to W3Schools.