编辑下面的代码:【加编码】
<html> <body> <form action="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>The output element below is outside the form, but still a part of it.</p> <output form="numform" name="x" for="a b"></output> <p><b>Note:</b> The form attribute of the output element is not supported in any of the major bowsers.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂