HTML <出力>フォーム属性

❮HTML<output>タグ

フォームの外側にある<output>要素(ただし、フォームの一部):

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

定義と使用法

form属性は、タグが属するフォームを指定します <output>

属性の値は 、同じドキュメント内の要素の属性formと同じである必要があります。 id<form>


ブラウザのサポート

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

構文

<output form="form_id">

属性値

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<output>タグ