0 votes
60 views
asked in java script by

How do I get the website URL?

Not the URL as taken from a link. On the loading page, I want to get the full, current URL of the current web page and store its value in a variable.

1 Answer

0 votes
answered by (8.2k points)

Use:

alert(document.URL);

See URL of type DOMString, readonly.

Categories

...