簡體   English   中英

使用PhoneGap在iPhone上獲取搜索鍵盤

[英]Getting Search Keyboard on iPhone using PhoneGap

我在通過PhoneGap創建的移動應用上創建了一個搜索字段。 我試過沒有運氣。 我也知道我可以通過CSS和Javascript繞過輸入字段的視覺方面,但是如何讓鍵盤在右下角有一個“搜索”按鈕,而不是說“返回”

使用

<form> ...
<input type="search" /> ...
</form>

<form>是必須的。

(另請參閱http://groups.google.com/group/phonegap/browse_thread/thread/bca19709dbdf2e24/eb312d0607102395?lnk=raot

移動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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM