HTMLAreaElement: pathname-Eigenschaft
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Die HTMLAreaElement.pathname
-Eigenschaft ist eine
Zeichenkette, die mit einem anfänglichen '/'
beginnt, gefolgt vom Pfad der
URL ohne den Query-String oder Fragment (oder einer leeren Zeichenkette, falls kein
Pfad vorhanden ist).
Der Pfad wird prozentkodiert beim Setzen, jedoch nicht prozentdekodiert beim Auslesen.
Wert
Eine Zeichenkette.
Beispiele
js
// An <area id="myArea" href="/en-US/docs/HTMLAreaElement"> element is in the document
const area = document.getElementById("myArea");
area.pathname; // returns '/en-US/docs/HTMLAreaElement'
Spezifikationen
Specification |
---|
HTML # dom-hyperlink-pathname-dev |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
pathname |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Siehe auch
- Die
HTMLAreaElement
-Schnittstelle, zu der sie gehört.