HTML-DOM Meta Inhalt Eigenschaft
Definition und Verwendung
Inhalt Eigenschaft setzt oder liefert Meta-Element Inhalt Attributwerte.
Inhalt Attribut gibt den Inhalt von Meta-Informationen.
Hinweis: Diese Eigenschaft ist abhängig vom Wert der verfügbaren ist Name und httpEquiv Eigenschaft.
Grammatik
Einstellen Inhaltseigenschaften:
linkObject.content="text"
Gibt Inhaltseigenschaften:
linkObject.content
Browser-Unterstützung
Alle gängigen Browser unterstützen Inhalt Eigentum
Beispiele
Beispiele
Alle Metainhalt Attributwerte:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Meta name = "keywords" content = "HTML, DHTML, CSS, XHTML, JavaScript">
<Meta name = "description" content = "Free Web-Tutorials">
<Meta name = "author" content = "Hege Refsnes">
<Meta http-equiv = "Content-Type" content = "text / html; charset = utf-8">
<Script>
Funktion displayResult () {
var x = document.getElementsByTagName ( "meta");
var txt = "";
for (var i = 0; i <x.length; i ++) {
txt = txt + "Inhalt" + (i + 1) +: + x [i] .content + "<br>", "Meta-Tag."
}
document.getElementById ( "Ergebnis") innerHTML- = txt .;
}
</ Script>
</ Head>
<Body>
<Taste type = "button" Onclick = "displayResult ()"> Anzeige Meta Inhalt </ button>
<P id = "Ergebnis"> </ p>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Meta name = "keywords" content = "HTML, DHTML, CSS, XHTML, JavaScript">
<Meta name = "description" content = "Free Web-Tutorials">
<Meta name = "author" content = "Hege Refsnes">
<Meta http-equiv = "Content-Type" content = "text / html; charset = utf-8">
<Script>
Funktion displayResult () {
var x = document.getElementsByTagName ( "meta");
var txt = "";
for (var i = 0; i <x.length; i ++) {
txt = txt + "Inhalt" + (i + 1) +: + x [i] .content + "<br>", "Meta-Tag."
}
document.getElementById ( "Ergebnis") innerHTML- = txt .;
}
</ Script>
</ Head>
<Body>
<Taste type = "button" Onclick = "displayResult ()"> Anzeige Meta Inhalt </ button>
<P id = "Ergebnis"> </ p>
</ Body>
</ Html>
Versuchen »
Meta Object