The form attribute on an <output> tag specifies the form the output element is associated with.
Although linked to the form, the output is not included in form submission.
An <output> element with a form attribute. The output element is outside the form, but associated with it. Move the slider to see the output value update.
The value is
<form action="/tutorial/action.html" id="pressure-form"
oninput="result.value = slider.value">
<fieldset>
<legend>Pipe Pressure</legend>
<input type="range" id="slider" name="pressure"
value="25"><br /><br />
<input type="submit" value="Submit">
</fieldset>
</form> <br />
<p>The value is
<output form="pressure-form" name="result" for="slider">25</output>
</p>
Note: The output value is not submitted during form submission.
The form attribute specifies which form the output belongs to.
The attribute value is the id of the form.
The output value is not included during form submission.
Note: The form attribute on the output tag has been deprecated.
<output form="form-id">
Value | Description |
---|---|
form-id | The id value of the form. |
Here is when form support started for each browser:
Chrome
|
Not Supported | |
Firefox
|
Not Supported | |
IE/Edge
|
Not Supported | |
Opera
|
Not Supported | |
Safari
|
Not Supported |
Back to <output>