HTMLLinkElement
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. It’s been available across browsers since июль 2015 г..
* Some parts of this feature may have varying levels of support.
Интерфейс HTMLLinkElement представляет справочную информацию для внешних ресурсов и отношение этих ресурсов к документу и наоборот (соответствует элементу <link>; не путать с <a>, который представлен элементом HTMLAnchorElement). Этот объект наследует все свойства и методы интерфейса HTMLElement.
Свойства
Наследует свойства от своего родителя, HTMLElement, и LinkStyle.
HTMLLinkElement.as-
Это
Stringпредставляющий тип контента загружаемый по HTML ссылке. HTMLLinkElement.crossOrigin-
Is a
Stringthat corresponds to the CORS setting for this link element. See CORS settings attributes for details. HTMLLinkElement.disabled-
Is a
Booleanwhich represents whether the link is disabled; currently only used with style sheet links. HTMLLinkElement.href-
Is a
Stringrepresenting the URI for the target resource. HTMLLinkElement.hreflang-
Is a
Stringrepresenting the language code for the linked resource. HTMLLinkElement.media-
Is a
Stringrepresenting a list of one or more media formats to which the resource applies. HTMLLinkElement.referrerPolicy-
Is a
Stringthat reflects thereferrerpolicyHTML attribute indicating which referrer to use. HTMLLinkElement.rel-
Is a
Stringrepresenting the forward relationship of the linked resource from the document to the resource. HTMLLinkElement.relListТолько для чтения-
Is a
DOMTokenListthat reflects therelHTML attribute, as a list of tokens. HTMLLinkElement.sizesТолько для чтения-
Is a
DOMSettableTokenListthat reflects thesizesHTML attribute, as a list of tokens. LinkStyle.sheetТолько для чтения-
Returns the
StyleSheetobject associated with the given element, ornullif there is none. HTMLLinkElement.type-
Is a
Stringrepresenting the MIME type of the linked resource.
Устаревшие свойства
HTMLLinkElement.charset-
Is a
Stringrepresenting the character encoding for the target resource. HTMLLinkElement.rev-
Is a
Stringrepresenting the reverse relationship of the linked resource from the resource to the document.Примечание: Currently the W3C HTML 5.2 spec states that
revis no longer obsolete, whereas the WHATWG living standard still has it labeled obsolete. Until this discrepancy is resolved, you should still assume it is obsolete. HTMLLinkElement.target-
Is a
Stringrepresenting the name of the target frame to which the resource applies.
Методы
Не имеет методов; наследует методы от своего родителя, HTMLElement, и LinkStyle.
Спецификации
| Specification |
|---|
| HTML> # htmllinkelement> |
Совместимость с браузерами
Смотрите также
- Элемент HTML, реализующий этот интерфейс:
<link>.