get domain name of current page javas cript code example Example: get domain name javascript window.location.hostname