Objek Link DOM HTML
Link object
The Link object represents the HTML <link> element.
Access Link object
You can access <link> elements using getElementById():
var x = document.getElementById("myLink");
Create Link object
You can create <link> elements using the document.createElement() method:
var x = document.createElement("LINK");
Link object properties
Sifat | Description |
---|---|
charset |
Not supported in HTML5. Set or return the character encoding of the linked document. |
crossOrigin | Set or return the CORS settings of the linked document. |
disabled | Set or return whether the linked document is disabled. |
href | Set or return the URL of the linked document. |
hreflang | Set or return the language code of the linked document. |
media | Set or return the media type of the linked element. |
rel | Set or return the relationship between the current document and the linked document. |
rev |
Not supported in HTML5. Set or return the reverse relationship from the linked document to the current document. |
sizes | Return the value of the sizes attribute of the linked resource. |
type | Set or return the content type of the linked document. |
Laman yang berkaitan
Panduan Rujukan HTML:Tanda <link> HTML