Window location.pathname 属性
- Vorherige Seite origin
- Nächste Seite port
- Zurück zur vorherigen Ebene Window Location
定义和用法
pathname
属性设置或返回 URL(页面)的路径名。
语法
返回 pathname 属性:
location.pathname
设置 pathname 属性:
location.pathname = path
属性值
值 | Beschreibung |
---|---|
path | URL 的路径名。 |
Rückgabewert
Typ | Beschreibung |
---|---|
Zeichenkette | Aktueller Pfadname. |
Browserunterstützung
Alle Browser unterstützen location.pathname
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Unterstützung | Unterstützung | Unterstützung | Unterstützung | Unterstützung | Unterstützung |
- Vorherige Seite origin
- Nächste Seite port
- Zurück zur vorherigen Ebene Window Location