Атрибут формы 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>