How to Get the Current URL

There are several scenerios when you may want to get the current URL from the address bar. This could be if you wanted to retrieve information in querystring (like a referal code) or if you want to send the URL information to another form (like the ShareThisPage feature).

     

JavaScript

Examples