Home > Web Front-end > JS Tutorial > Miss JS location several methods_javascript skills

Miss JS location several methods_javascript skills

WBOY
Release: 2016-05-16 19:02:54
Original
1080 people have browsed it

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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template