我正在使用PhoneGap开发iPhone应用程序。在应用程序中,有一个页面只包含一个textarea供用户输入。由于此页面上没有其他输入字段,我想隐藏键盘上方的工具栏以为用户提供更多可用空间。有没有办法这样做?使用javascript
答案 0 :(得分:3)
您可以通过将其添加到config.xml来隐藏它:
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
http://docs.phonegap.com/en/3.4.0/config_ref_index.md.html#The%20config.xml%20File
答案 1 :(得分:1)
我不知道这是否可以通过phonegap API直接实现,但您可以通过编写PhoneGap插件来更改此行为。
请参阅以下链接以获取更多详细信息(它们不准确,但会为您提供所需的详细信息):
Programmatically align a toolbar on top of the iPhone keyboard
http://gabriel-tips.blogspot.in/2011/05/input-accessory-view-how-to-add-extra.html
答案 2 :(得分:1)
试试这个cordova插件 https://github.com/don/KeyboardToolbarRemover
也回答了这个重复的帖子Phonegap iOS6: Proper solution to Remove form assistant bar (prev, next, done)
答案 3 :(得分:0)