这个pathname
属性设置或返回 URL(页面)的路径名。
返回路径名属性:
location.pathname
设置路径名属性:
location.pathname =
path
Parameter | Description |
path | The pathname of the URL. |
类型 | 描述 |
一个字符串 | 当前路径名。 |
location.pathname
所有浏览器都支持:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!