将jqxInput官方示例简化版本如下:
[php]
jqx Input test$(document).ready(function () {
var theme = prepareSimulator("input");
var countries = new Array("中国", "美国", "加拿大", "Andorra", "Angola", "Antarctica", "Antigua and Barbuda", "Argentina");
$("#input").jqxInput({ theme: theme, placeHolder: "Enter a Country", height: 35, width: '80%', source: countries });
initSimulator("input");
});
测试输入:
[/php]
在实际测试中我们发现,上述标准代码在Android系统中表现正常,但在iOS下输入中文时出现bug,使用系统自带中文输入法仅能捕获处理输入汉字时所打拼音对应的字母/单词;使用搜狗输入法时完全没有任何响应。
解决方法:通过测试我们发现input元素仍然会响应jQuery原生的input事件,