1 location.pathname; 这在之前我没怎么注意过,所以研究研究.location.pathname:返回URL的域名(域名IP)后的部分.例如 http://www.joymood.cn/wordpress/返回/wordpress/,又或则 http://127.0.0.1/index.html 返回/index.html,注意是带url的域名或域名IP,在磁盘上随便建个Html文件进行location.pathname测试,如浏览器上的路径是:C:\Documents and…