HTML <output> form Atribut

❮ HTML tag <output>

Příklad

Prvek <output> umístěný mimo formulář (ale stále součástí formuláře):

<form action="/action_page.php" id="numform"
oninput="x.value=parseInt(a.value)+parseInt(b.value)">
<input type="range" id="a" name="a" value="50">
+ <input type="number" id="b" name="b" value="25">
<input type="submit">
</form>

<output form="numform" id="x" name="x" for="a+b"></output>

Definice a použití

Atribut formurčuje formu, do které <output>značka patří.

Hodnota formatributu se musí rovnat idatributu <form> prvku ve stejném dokumentu.


Podpora prohlížeče

Attribute
form Not supported Not supported Not supported Not supported Not supported

Syntax

<output form="form_id">

Hodnoty atributů

Value Description
form_id Specifies the form element the <output> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document.

❮ HTML tag <output>