Window location.assign() metode
- Forrige side assign()
- Næste side hash
- Gå tilbage til niveauet over Window Location
Definition and usage
assign()
Method to load a new document.
See also:
The difference between assign() and replace():
replace()
Remove the current URL from the document history.
Use replace()
Cannot use "Back" navigation to return to the original document.
Syntax
location.assign(URL)
Parameters
Parameters | Description |
---|---|
URL | Required. The URL of the page to navigate to. |
Return value
None.
Browser support
Alle browsere understøtter location.assign()
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support | Support |
- Forrige side assign()
- Næste side hash
- Gå tilbage til niveauet over Window Location