![](/img/trans.png)
[英]How to hide and show the keyboard on an iPhone using Phonegap and javascript
[英]Getting Search Keyboard on iPhone using PhoneGap
我在通过PhoneGap创建的移动应用上创建了一个搜索字段。 我试过没有运气。 我也知道我可以通过CSS和Javascript绕过输入字段的视觉方面,但是如何让键盘在右下角有一个“搜索”按钮,而不是说“返回”
使用
<form> ...
<input type="search" /> ...
</form>
<form>
是必须的。
移动Safari中支持以下功能,因此iPhone OS 3.1支持PhoneGap
文字:<input type =“text”/>
电话:<input type =“tel”/>
网址:<input type =“url”/>
电子邮件:<input type =“email”/>
邮政编码:<input type =“text”pattern =“[0-9] *”/>
搜索不支持作为输入类型,并且需要在PhoneGap中进行大量本机工作。
有关详细信息,请参阅此处: https : //developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html
更新:以下输入类型按预期工作:
你必须记住一些重要的事情:
它仅适用于iPhone OS 3.1 +
输入标签必须位于标签内。
此外,还值得注意以下标记:
<!-- display a telephone keypad -->
<label for="tiTel">Telephone:</label>
<input type="tel" id="tiTel"/>
<br/>
<!-- display a URL keyboard -->
<label for="tiUrl">URL:</label>
<input type="url" id="tiUrl"/>
<br/>
<!-- display an email keyboard -->
<label for="tiEmail">Email:</label>
<input type="email" id="tiEmail"/>
<br/>
<!-- display a numeric keyboard -->
<label for="tiZip">Zip Code:</label>
<input type="text" pattern="[0-9]*" id="tiZip"/>
<br/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.