Categories
Web Development

JavaScript: Accessing the window’s location

Just confusing.
I was trying to access the location of the current window using
window.location.

That works, but surprisingly, that is NOT a string object, but an object.
To get a string out of the location, you must access
window.location.href
which is the full URL in the window.

Share
Share