Get The Current Domain Name With Javascript code example Example: get domain name javascript window.location.hostname