运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> Number: <input type="number" id="myNumber"> <p>Click the button to decrement the value of the number field by 1.</p> <p><strong>Note:</strong> This is the same as clicking the down arrow on the right side of the number field.</p> <button onclick="myFunction()">Try it</button> <p><strong>Note:</strong> The stepDown() method is not supported by Internet Explorer.</p> <script> function myFunction() { document.getElementById("myNumber").stepDown(); } </script> </body> </html>