JavaScript Window Location
The window.location object can be used to get current page address (URL), domain name, path and filename of the current page.
The window.location object can be used to get current page address (URL), domain name, path and filename of the current page.