Nos bénévoles n'ont pas encore traduit cet article en Français. Aidez-nous à réaliser cette tâche !
The URLUtils.pathname property is a DOMString containing an initial '/' followed by the path of the URL.
Syntax
string = object.pathname; object.pathname = string;
Examples
// Let's an <a id="myAnchor" href="/old?u=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FURLUtils.pathname&y=1999"> element be in the document
var anchor = document.getElementByID("myAnchor");
var result = anchor.pathname; // Returns:'/en-US/docs/URLUtils.pathname'
Specifications
| Specification | Status | Comment |
|---|---|---|
| URL | Living Standard | Initial definition. |
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | Not supported [1] | 22 (22) [1] | Not supported [1] | Not supported [1] | Not supported [1] |
| Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | Not supported [1] | Not supported [1] | 22.0 (22) [1] | Not supported [1] | Not supported [1] | Not supported [1] |
[1] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported.
See also
- The
URLUtilsinterface it belongs to.
Étiquettes et contributeurs liés au document
Dernière mise à jour par :
mturnwall,