html http://jsfiddle.net/lesson8/HkEuf/1/

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html http://jsfiddle.net/lesson8/HkEuf/1/相关的知识,希望对你有一定的参考价值。

Number : <input type="text" name="quantity" id="quantity">&nbsp;<span id="errmsg"></span>

<script>
$(document).ready(function () {
  //called when key is pressed in textbox
  $("#quantity").keypress(function (e) {
     //if the letter is not digit then display error and don't type anything
     if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
        //display error message
        $("#errmsg").html("Digits Only").show().fadeOut("slow");
               return false;
    }
   });
});
</script>

以上是关于html http://jsfiddle.net/lesson8/HkEuf/1/的主要内容,如果未能解决你的问题,请参考以下文章

html 只是几个导航,哈利出去。 http://jsfiddle.net/rz85X/18/

html Hello React - 复合组件 - 访问childern。 JsFiddle:http://jsfiddle.net/gh/gist/library/pure/1345be9f312

html 鼠标滚轮动画CSS图标| http://jsfiddle.net/cmajo9h6/

html 将24小时时间转换为12小时格式//演示:http://jsfiddle.net/tvpt4zgp/

html 虚拟主机带宽计算器(jQuery)//演示:http://jsfiddle.net/cydL0hby/4/

html 简单动态下拉(马来西亚国家)使用jQuery //演示:http://jsfiddle.net/qwv7vLvy/