Location - URL of the current page

The Location object is associated with the address bar of the browser, and its properties contain all read and write URL components.

Location is usually accessed through Document.location or Window.location objects. If the script is run from an iframe (on the same domain), the parent window can be accessed through window.parent.location.

Let's see what the values will be for the following URL:

http://www.example.com/pages/contats?page=1&sort=2#marker

25.10.2018, updated 05.03.2021
59

Comments

to add a comment.

Other publications

Auto height textarea
Auto-resizing textarea can be done in the following way...
161
0
Item appearing in turn
Examples of how to make elements progressively appear using standard jQuery animation functions.
79
0
Close browser tab using JavaScript
To close the current tab or browser window in JS, just call the method...
1952
0
How to make blocks of the same height
The easiest way to make blocks with the same height is using jQuery, for example, let's take the following block layout.
61
0