Window Location Pathname
location.pathname 属性返回 URL 的路径名。
实例
返回当前 URL 的路径名:
<script>
document.write(location.pathname);
</script>
以上代码输出为:
/js/js-window-location.html
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h65172.shtml