属性のHTML <出力>
例
計算を実行し、結果を<output>要素に表示します。
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">
<input type="range" id="a" value="50">
+<input type="number" id="b" value="25">
=<output name="x" for="a b"></output>
</form>
定義と使用法
このfor
属性は、計算結果と計算で使用される要素との関係を指定します。
ブラウザのサポート
表の数字は、属性を完全にサポートする最初のブラウザーバージョンを示しています。
Attribute | |||||
---|---|---|---|---|---|
for | 10.0 | 13.0 | 4.0 | 7.0 | 11.5 |
構文
<output for="element_id">
属性値
Value | Description |
---|---|
element_id | Specifies a space separated list of ids of one or more elements that specifies the relationship between the result of the calculation, and the elements used in the calculation |
❮HTML<output>タグ