how to get the server name in javascript code example Example: javascript get domain window.location.hostname