How to get the current browser URL using JavaScript?
<p>I have a website on a host <code>example.myhost.com</code>
but I also have a sub-domain for French <code>fr.example.myhost.com</code> which is different than example.myhost.com.</p>

<p>If I'm at <code>fr.example.myhost.com</code> and I use <code>window.location.href</code>, I get <code>example.myhost.com</code> instead of <code>fr.example.myhost.com</code>.</p>

<p>How do I get the URL typed in the address bar of the browser?</p>
