window . location . host ; // returns the host part of the url, for example: www.xxx.com window . location . hostname ; // returns www.xxx.com window . location . href ; // returns the entire url string
window . location . pathname ; //return /a/index.php or /index.php
window . location . protocol ; //Return the protocol part of the url, for example: http:, ftp:, maito: and so on.
window . location . port //The port part of the url, if the default port 80 is used, the return value is not the default 80 but a null character