HTMLHyperlinkElementUtils.password
HTMLHyperlinkElementUtils**.password
** property 属性是一个USVString
,包含域名前面指定的密码。
如果在没有首先设置用户名
属性的情况下设置,则会静默失败。
Syntax
string = object.password; object.password = string;
Examples
js
// Let's <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/zh-CN/docs/HTMLHyperlinkElementUtils.username"> be in the document
var anchor = document.getElementByID("myAnchor");
var result = anchor.password; // Returns:'flabada'
Specifications
Specification |
---|
HTML Standard # dom-hyperlink-password-dev |
Browser compatibility
BCD tables only load in the browser
See also
- The
HTMLHyperlinkElementUtils
mixin it belongs to.