javascript how to get document domain path code example Example: get domain name javascript window.location.hostname