속성 에 대한 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 <출력> 태그