javascript get current only domain code example Example: javascript get domain window.location.hostname