jquery airport插件:如何使它使用特殊字符? [英] jquery airport plugin : How can I make it work with special characters?

查看:110
本文介绍了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插件:如何使它使用特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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