Get the URL of the current page

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 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326644766&siteId=291194637