验证文本框:表示不插入小数点 [英] Validating textbox : for not insert decimal point

查看:58
本文介绍了验证文本框:表示不插入小数点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





请在文本框中提供不允许小数点的jquery。







谢谢和问候,

Anupama



Please provide a jquery for not allowing decimal point in a textbox.



Thanks & Regards,
Anupama

推荐答案

你可以限制小数通过使用numeric.js插件。您可以从这里下载

https://github.com/SamWM/jQuery-Plugins/blob/master/numeric/jquery.numeric.js [ ^ ]

也将代码放在头部

You can restrict decimal by using numeric.js plugin.You can download it from here
https://github.com/SamWM/jQuery-Plugins/blob/master/numeric/jquery.numeric.js[^]
Also put the code in head section
<script type="text/javascript">


#textboxId)。numeric( false ,function(){alert ( 仅整数); value = ; this .focus(); });
< / script >
("#textboxId").numeric(false, function() { alert("Integers only"); this.value = ""; this.focus(); }); </script>



希望这有帮助


Hope this helps


这篇关于验证文本框:表示不插入小数点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆