Is it possible to show and customize the native keyboard with Ionic framework? Lets say for example that I want to show the native keyboard when you come to a state and I want the keyboard to only contain specific characters (only letter for example).
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can do this with the keyboard plugin. Checkout this plugin
http://ngcordova.com/docs/plugins/keyboard/
回答2:
Input Type Method
Although you cannot change the makeup of the keyboard, you can use different type
parameters on your input elements to control which type of keyboard mobile devices will show.
For an overview of the different types of inputs, check out this site.
Return False Method
In addition to changing the type of keyboard that displays, you can also specifically allow or disable certain characters. Accomplish this by checking each keycode as it is typed. For a reference of keycodes, see here.
<input type="text" onkeypress="if(event.keyCode == 101){ return false; }">
标签:
ionic-framework