Atributo de formulário HTML <saída>
Exemplo
Um elemento <output> localizado fora de um formulário (mas ainda faz parte do formulário):
<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>
Definição e uso
O form
atributo especifica o formulário ao qual a
<output>
tag pertence.
O valor do form
atributo deve ser igual ao
id
atributo de um <form>
elemento no mesmo documento.
Suporte ao navegador
Attribute | |||||
---|---|---|---|---|---|
form | Not supported | Not supported | Not supported | Not supported | Not supported |
Sintaxe
<output form="form_id">
Valores de atributo
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. |
❮ Tag HTML <saída>