Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 Phonegap 应用程序中,我需要一个可滚动的 div,当用户单击它时,设备键盘应该是打开的,并且文本应该可以在 div 中写入。但我不知道如何为这两个设备打开设备本机键盘。是否有任何插件可用于此功能。
有一个隐藏的输入字段和onclick该 div 的事件,只需调用focus()该输入字段。它会自动调出键盘。然后您可以读取输入字段的内容并将其写入 div。
onclick
focus()