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-
Это
DOMStringпредставляющий тип контента загружаемый по HTML ссылке. HTMLLinkElement.crossOriginЭкспериментальная возможность-
Is a
DOMStringthat 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
DOMStringrepresenting the URI for the target resource. HTMLLinkElement.hreflang-
Is a
DOMStringrepresenting the language code for the linked resource. HTMLLinkElement.media-
Is a
DOMStringrepresenting a list of one or more media formats to which the resource applies. HTMLLinkElement.referrerPolicyЭкспериментальная возможность-
Is a
DOMStringthat reflects thereferrerpolicyHTML attribute indicating which referrer to use. HTMLLinkElement.rel-
Is a
DOMStringrepresenting 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
DOMStringrepresenting the MIME type of the linked resource.
Устаревшие свойства
HTMLLinkElement.charset-
Is a
DOMStringrepresenting the character encoding for the target resource. HTMLLinkElement.rev-
Is a
DOMStringrepresenting 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
DOMStringrepresenting the name of the target frame to which the resource applies.
Методы
Не имеет методов; наследует методы от своего родителя, HTMLElement, и LinkStyle.
Спецификации
| Specification |
|---|
| HTML> # htmllinkelement> |
Совместимость с браузерами
Loading…
Смотрите также
- Элемент HTML, реализующий этот интерфейс:
<link>.