HTMLHyperlinkElementUtils.pathname
HTMLHyperlinkElementUtils.pathname
属性是一个 USVString
,其中包含一个初始的'/'后跟 URL 的路径。
Syntax
string = object.pathname; object.pathname = string;
Examples
// Let's an <a id="myAnchor" href="https://developer.mozilla.org/en-US/docs/HTMLHyperlinkElementUtils.pathname"> element be in the document
var anchor = document.getElementById("myAnchor");
var result = anchor.pathname; // Returns:'/en-US/docs/HTMLHyperlinkElementUtils.pathname'
Specifications
Specification |
---|
HTML Standard # dom-hyperlink-pathname-dev |
Browser compatibility
BCD tables only load in the browser
See also
- The
HTMLHyperlinkElementUtils
mixin it belongs to.