numericscrollexample.htm

来自「这是javascript高级程序设计的源码」· HTM 代码 · 共 19 行

HTM
19
字号
<html>
    <head>
        <title>Numeric Scroll Example</title>
        <script type="text/javascript" src="detect.js"></script>
        <script type="text/javascript" src="eventutil.js"></script>
        <script type="text/javascript" src="textutil.js"></script>
    </head>
    <body>
        <p>Type a number into the textbox, then press the up or down arrow.</p>
        <form method="post" action="javascript:alert('Submitted')">
            <input type="text" onkeypress="return TextUtil.allowChars(this, event)" 
                validchars="0123456789" onblur="TextUtil.blurAllow(this)" 
                onkeydown="TextUtil.numericScroll(this, event)" />

            <input type="submit" value="Submit Form" />
        </form>
    </body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?