属性概览 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.
方法概览 reload Forces a reload of the window's current document. replace Loads the specified URL over the current history entry.
host A string specifying the server name, subdomain, and domain name. newWindow.location.href = http://skylaugh.cnblogs.com newWindow.location.host = skylaugh.cnblogs.com
href A string specifying the entire URL.
window.location.href="http://home.netscape.com/"
pathname A string specifying the URL-path portion of the URL.
search A string beginning with a question mark that specifies any query information in the URL.