Location
Last updated
Was this helpful?
Last updated
Was this helpful?
Location
object is used to retrieve the current location (URL) of the document and provides different methods to manipulate document location. One can access the current location by
Note:
window.location
anddocument.location
references the same location object.
Let's take an example of the following URL and explore the different properties of location