HTML
Example
Displaying the result of a calculation in the
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)" 0>
<input type="range" id="a" value="50">100 +
<
input
type
=
"
number
"
id
=
"
b
"
value
=
"
50
"
=
<
output
name
=
"
x
"
for
=
"a b
"
output
Try it »
Browser support
The numbers in the table indicate the first browser version that supports this property.
| Element | |||||
|---|---|---|---|---|---|
| 10.0 | 13.0 | 4.0 | 5.1 | 11.0 |
Tag Definition and Usage Notes
Differences between HTML 4.01 and HTML5
property
New: new attribute in HTML5.
| property | Value | Description |
|---|---|---|
| forNew | element_id | Describes the relationship between the elements used in the calculation and the result. |
| formNew | form_id | Defines one or more forms to which the input field belongs. |
| nameNew | name | Defines a unique name for the object (used when submitting the form). |