urlObject.pathname


pathname 属性由 URL 的整个路径部分组成。它包含了紧随 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.】

例如:'/p/a/t/h'

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

不执行路径字符串的解码。

【No decoding of the path string is performed.】