location的各个属性

hash——Specifies an anchor name in the URL. 
host——Specifies the host and domain name, or IP address, of a network host. 
hostname——Specifies the host:port portion of the URL. 
href——Specifies the entire URL. 
pathname——Specifies the URL-path portion of the URL. 
port——Specifies the communications port that the server uses. 
protocol——Specifies the beginning of the URL, including the colon. 
search——Specifies a query.

 

你可能感兴趣的:(location)