xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>W3Cschool(w3cschool.cn)</title>
</head>
<body>
<form action="/statics/demosource/demo-form.php" id="numform" oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" name="a" value="50">100
+<input type="number" id="b" name="b" value="50">
<br><br>
<input type="submit">
</form>
<p> element 元素在表单之外,但它仍属于该表单的一部分。</p>
<output form="numform" name="x" for="a b"></output>
<p><b>注意:</b>几乎所有的主流浏览器都不支持 form 属性。</p>
</body>
</html>