Getting the current URL
To get the current (full) URL of a website, you can use the
Here is an example:
Similarly, you can also use the
document.documentURI property (both returns the document location in string format).
Getting the current URL in JQuery
If you want to access the current URL in Jquery, you can use the following: