本文介绍了jquery airport插件:如何使它使用特殊字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用很酷的 jquery机场插件,并试图使其接受特殊字符(例如重音符号&"等).默认情况下,它仅适用于a-z.
I'm using the cool jquery airport plugin and trying to make it accept special characters (like accents, "&", etc.). By default it only works with a-z.
有人发现怎么做吗?
推荐答案有一个可以添加字符的chars数组.
There is a chars array that you can add characters to.
var chars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', ' ', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '-'];这样做就足够了.
PS:有时候,查看程序的源代码确实很有启发性. ;-)
PS: Sometimes, looking at the source code of a program can be really enlightening. ;-)
更多推荐
jquery airport插件:如何使它使用特殊字符?
发布评论