👻 See our latest reviews to choose the best laptop for Machine Learning and Deep learning tasks!
allows you to go to a new URL. You can use the following methods to access a new URL: ..
- Assigning a new value to document.location
- Using window.assign () < / Li Method>
- Use of the window.replace () method.
These three methods serve the purpose of navigating to another URL too. Let ’s take a look at each of these methods.
To access a new URL, use the browser history API location object . Session History allows you to reassign the location object to a new URL or use the href property on that same object.
The syntax for this approach is:.
Let’s take a look to this method as an example.