Formularz HTML <wyjście> Atrybut

❮ Znacznik HTML <output>

Przykład

Element <output> znajdujący się poza formularzem (ale nadal częścią formularza):

<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>

Definicja i użycie

formAtrybut określa formę, do której należy <output>tag.

Wartość formatrybutu musi być równa idatrybutowi <form> elementu w tym samym dokumencie.


Obsługa przeglądarki

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

Składnia

<output form="form_id">

Wartości atrybutów

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.

❮ Znacznik HTML <output>