Possible Duplicate:
Get current URL with JavaScript?
How do you get the address of the page you are on in JavaScript?
For example, if I had a script at somesite.com/javascript/home.html and I want to find out the request address (somesite.com/javascript/home.html), how do I get this information in JavaScript?
You need to use:
document.locationorwindow.locationYou can read more here. Or there is a little more explanation over there.
For clarifying matter:
Originally Posted by Mozilla Developer Center