HTMLHyperlinkElementUtils.username

HTMLHyperlinkElementUtils.username 属性是一个 USVString包含域名前面指定的用户名。

Syntax

string = object.username;
object.username = 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.username; // Returns:'anonymous'

Specifications

Specification
HTML Standard
# dom-hyperlink-username-dev

Browser compatibility

BCD tables only load in the browser

See also