jquery插件,用于防止输入任何与正则表达式不匹配的输入 [英] jquery plugin for preventing entering any input not matching a regexp
本文介绍了jquery插件,用于防止输入任何与正则表达式不匹配的输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
jquery是否有任何插件可以阻止输入任何与正则表达式模式不匹配的文本框的输入。例如,我有一个文本框用于输入付款金额,我希望用户只能输入数字和。在文本框中,所有其他输入都不会对文本框产生任何影响..
does jquery have any plugin that prevents entering any input to a textbox that doesnt match a regexp pattern. for example , i have a textbox for entering payment amount, i want user t be able to enter only numebers and . in the textbox, all other input wont have any effect on the textbox..
谢谢
推荐答案
jquery-keyfilter插件 - 完成所需的工作。
jquery-keyfilter plugin - does what is needed.
这篇关于jquery插件,用于防止输入任何与正则表达式不匹配的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文