English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
assign()The method causes the window to load and display the file specified at the URL.
If the assignment cannot be performed due to a security conflict, then a DOMException of type SECURITY_ERROR is thrown.
location.assign(URL)
location.assign("https://www.oldtoolbag.com");Test See‹/›
All browsers fully support the Assign() method:
Method | |||||
assign() | Is | Is | Is | Is | Is |
Parameter | Description |
---|---|
URL | A string containing the URL of the page to be viewed |
Return Value: | None |
---|
Location Reference:location.reload() method
Location Reference:location.replace() method