Javascript
How to get domain name in javascript
Getting domain name from javascript is simple. You can get domain name from [cci]window.location.hostname[/cci] variable. var hostname = window.location.hostname; alert(hostname); Click following button to test above code. Get full domain name Domain name you got this way is simply domain name in browser address bar. Sometimes address bar you got Read more…