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>

정의 및 사용

태그 는 <output>계산 결과를 나타내는 데 사용됩니다(예: 스크립트에서 수행한 결과).


브라우저 지원

표의 숫자는 요소를 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.

Element
<output> 10.0 13.0  4.0 5.1 11.0

속성

Attribute Value Description
for element_id Specifies the relationship between the result of the calculation, and the elements used in the calculation
form form_id Specifies which form the output element belongs to
name name Specifies a name for the output element


전역 속성

<output>태그는 HTML의 전역 속성도 지원 합니다 .


이벤트 속성

<output>태그는 HTML의 이벤트 속성 도 지원합니다 .


관련 페이지

HTML DOM 참조: 출력 객체


기본 CSS 설정

대부분의 브라우저는 <output>다음 기본값으로 요소를 표시합니다.

output {
  display: inline;
}