All I want is to get the website URL. Not the URL as taken from a link. On the page loading I need to be able to grab the full, current URL of the website and set it as a variable to do with as I please.
JavaScript URL – How to Get the Current URL
javascripturl
Best Answer
Use:
As noted in the comments, the line below works, but it is bugged for Firefox.
See URL of type DOMString, readonly.