html5 ?? ??? ??? ?????? html5 ?? ??? ???? ??? ?? ??? ????. ? ????? html5 ?? ??? ??? html5 ?? ?? ?? ??(?? ?? ??)? ?????.
html5 ?? tag ?? ??:
html5
1.for? ???? ??? ?? ??? ?? ID ??? ?????. ??? ??? ??? ??? ??? ?? ?? ?? ??? ?????.
2.form?
3.name?
?? ??:
?:
<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>
</form>
??:

??:
???? ??? ? ?? ??? ???? ??? ID? x? ??? ?? ?? x.value? ???? ??? ??? ????. innerHTML.
??? oninput ???? ???? ??? ?? ? ???? ??????!
html5 ?? ?? ?? ??:
?? ??
out標簽的用法
<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>
</form>
???? ?? ??? ???? ?? : #???? #
<form action="form_action.asp" method="get" name="sumform">
<output name="sum"></output>
</form>
TIY
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
function write_sum()
{
x=5
y=3
document.forms["sumform"]["sum"].value=x+y
}
</script>
</head>
<body onload="write_sum()">
<form action="form_action.asp" method="get" name="sumform">
<output name="sum"></output>
</form>
</body>
</html>
HTML 4.01? HTML5? ???
? ??? html5 ?? ??? ??? ?????? html5 ?? ??? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!