jquery陷阱只允许字母 [英] jquery trapping allow only letters

查看:76
本文介绍了jquery陷阱只允许字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个网页,其中我有一个输入文本字段,我只想在其中允许使用字母..

I am creating a web page where I have a input text field in which I want to allow only alphabet..

如何使用jQuery创建它?

How can i make it using jQuery??

谢谢

推荐答案

jquery.inputmask 是一个jquery插件,用于创建输入掩码。这只允许根据特定模式输入。例如,日期,文本,数字邮政编码等。

jquery.inputmask is a jquery plugin which create an input mask. That is allow only input according to a specific pattern. e.g, date, text, numbers zipcode etc.

还有 另一个(较旧的)版本

there is also another (older) version:


它允许用户更容易输入
固定宽度输入,你希望
他们以某种
格式输入数据(日期,电话号码等)。
已经在Internet Explorer
6/7,Firefox 1.5 / 2/3,Safari,Opera,
和Chrome.A模板上进行了测试,由
格式定义掩码文字和
掩码定义。任何不在
中的字符,下面的定义列表是
被视为掩码文字。面具
文字将在用户输入时自动输入
,并且不会被用户删除

It allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format (dates,phone numbers, etc). It has been tested on Internet Explorer 6/7, Firefox 1.5/2/3, Safari, Opera, and Chrome.A mask is defined by a format made up of mask literals and mask definitions. Any character not in the definitions list below is considered a mask literal. Mask literals will be automatically entered for the user as they type and will not be able to be removed by the user.

这篇关于jquery陷阱只允许字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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