pathname 属性包含网址的整个路径部分。 这是 host(包括 port)之后和 queryhash 组件开始之前的所有内容,由 ASCII 问号 (?) 或哈希 (#) 字符分隔。



The pathname property consists of the entire path section of the URL. This is everything following the host (including the port) and before the start of the query or hash components, delimited by either the ASCII question mark (?) or hash (#) characters.

For example: '/p/a/t/h'.

No decoding of the path string is performed.