HTML-DOM - Meta -Objekt
Meta-Objekt
Das Meta-Objekt repräsentiert ein HTML-<meta>-Element.
Greifen Sie auf ein Meta-Objekt zu
Sie können auf ein <meta>-Element zugreifen, indem Sie getElementsByTagName() verwenden:
var x = document.getElementsByTagName("META")[0];
Erstellen Sie ein Meta-Objekt
Sie können ein <meta>-Element erstellen, indem Sie die Methode document.createElement() verwenden:
Beispiel
var x = document.createElement("META");
Meta-Objekt-Eigenschaften
Property | Description |
---|---|
content | Sets or returns the value of the content attribute of a meta element |
httpEquiv | Sets or returns an HTTP header for the information in the content attribute |
name | Sets or returns a name for the information in the content attribute |
scheme | Not supported in HTML5. Sets or returns how the value of the content attribute should be interpreted |
Standardeigenschaften und -ereignisse
Das Meta-Objekt unterstützt auch die Standardeigenschaften und -ereignisse .
Verwandte Seiten
HTML-Referenz: HTML <meta>-Tag