运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <body> <h1>The output form attribute</h1> <form action="/action_page.php" id="numform" oninput="x.value=parseInt(a.value)+parseInt(b.value)"> <input type="range" id="a" name="a" value="50"> + <input type="number" id="b" name="b" value="25"> <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" id="x" name="x" for="a+b"></output> <p><strong>Note:</strong> The form attribute is not supported in any of the major browsers.</p> </body> </html>