Allowing just Numeric Text on Input Text field

后端 未结 3 1869
渐次进展
渐次进展 2021-02-09 00:11

I was using Jquery Numeric plugin but I found that is not working on FireFox 3.6 on Osx (does not allow pasting).

I\'m searching a Jquery plugin or Javascript snippet

3条回答
  •  花落未央
    2021-02-09 00:16

    Thanks to dev-null-dweller i have resolved with this script:

    jQuery('#input').bind('keyup blur',function(){ 
       jQuery(this).val( jQuery(this).val().replace(/[^0-9]/g,'') ); }
    );
    

提交回复
热议问题