HTMLHyperlinkElementUtils.protocol
Свойство HTMLHyperlinkElementUtils.protocol
– это USVString
, содержащий протокол URL включая ':'
в конце.
Синтаксис
string = object.protocol; object.protocol = string;
Примеры
// Допустим, что документ содержит элемент <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLHyperlinkElementUtils.protocol">
var anchor = document.getElementByID("myAnchor");
var result = anchor.protocol; // Вернёт: 'https:'
Спецификации
Specification |
---|
HTML Standard # dom-hyperlink-protocol-dev |
Совместимость с браузерами
BCD tables only load in the browser
Смотрите также
- Миксин
HTMLHyperlinkElementUtils
, к которому принадлежит это свойство.