HTML 태그 - output
본문
HTML 태그 - output
<output>태그는 계산된 결과값을 보여줄 때 사용합니다. HTML5에 추가되었습니다.
속성
for : 계산에 사용되는 요소들의 ID를 지정합니다.
name : 엘리먼트의 이름을 지정합니다.
샘플
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="코리아뉴스" />
<title> html공부 </title>
<link rel="stylesheet" type="text/css" href="default.css" / >
<style type="text/css">
body {
color:red;
}
</style>
</head>
<body>
<section>
<h1>output태그</h1>
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
0<input type="range" name="b" value="50" />100 +
<input type="number" name="a" value="10" /> =
<output name="result"> </output>
</form>
</section>
<div id="related">
<p>영역 </p>
</div>
<footer>
<address> 전화 : 031-574-3659, E-mail : master@koreanews.com </address>
Copyright ⓒ 2013 Koreanews co., All Rights Reserved.
</footer>
</body>
</html>
- 이전글HTML 태그 - param 14.12.11
- 다음글HTML 태그 - option 14.12.11