Home >Web Front-end >JS Tutorial >Miss JS location several methods_javascript skills
location.hash sets or gets the segment after the pound sign "#" in the href attribute.
location.host sets or gets the hostname and port number of location or URL.
location.hostname sets or gets the host name part of location or URL.
location.href sets or gets the entire URL as a string.
location.pathname sets or gets the file name or path specified by the object.
location.port sets or gets the port number associated with the URL.
location.protocol sets or gets the protocol part of the URL.
location.search sets or gets the part following the question mark in the href attribute.