HTML <Ausgabe> für Attribut

❮ HTML <output>-Tag

Beispiel

Führen Sie eine Berechnung durch und zeigen Sie das Ergebnis in einem <output>-Element:

<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">
  <input type="range" id="a" value="50">
  +<input type="number" id="b" value="25">
  =<output name="x" for="a b"></output>
</form>

Definition und Verwendung

Das forAttribut gibt die Beziehung zwischen dem Ergebnis der Berechnung und den in der Berechnung verwendeten Elementen an.


Browser-Unterstützung

Die Zahlen in der Tabelle geben die erste Browserversion an, die das Attribut vollständig unterstützt.

Attribute
for 10.0 13.0 4.0 7.0  11.5

Syntax

<output for="element_id">

Attributwerte

Value Description
element_id Specifies a space separated list of ids of one or more elements that specifies the relationship between the result of the calculation, and the elements used in the calculation

❮ HTML <output>-Tag