0
A
回答
0
「句柄」有點含糊......你想要完成什麼?
如果您針對特定需求調用正確的鍵盤,則不需要檢測任何按鈕。
僅當您的input
標籤位於form
元素內時,纔會顯示iOS鍵盤中的搜索按鈕。
例如:
// This will display a return button.
<input id="textField" type="text"/>
// This will display a search button.
<form>
<input id="searchField" type="search"/>
</form>
在JavaScript中,你可以使用jQuery keypress
事件一旦搜索按鈕被點擊觸發操作。例如:
$("#searchField").keypress(function() {
alert("Handler for .keypress() called.");
});
你也可以「檢測」的鍵盤的「類型」,在「搜索」,像以下的情況下(但這是有點明顯...):
if ($("#searchField").attr("type") == "search") {
alert("This search field is of type 'search'.");
}
否則,你將需要實現本地代碼(意思是Cordova plug-in)來檢測當前顯示的鍵盤的類型和執行的操作,等...
相關問題
- 1. IBM Worklight 6.1 - 如何使用「Go」按鈕顯示iOS鍵盤?
- 2. 檢測鍵盤搜索按鈕
- 3. 搜索鍵盤中的搜索按鈕
- 4. IBM Worklight 6.1支持iOS 9
- 5. 如何在Robotium測試中點擊軟鍵盤'搜索'按鈕?
- 6. IBM Worklight 6.1 - 如何集成Ionic框架?
- 7. IBM Worklight 6.1 - 如何打開鏈接?
- 8. 編程鍵盤上的搜索按鈕
- 9. IBM Worklight 6.1 - Dojo後退按鈕未調整至設備方向
- 10. 檢測iPad的鍵盤隱藏按鈕
- 11. Android鍵盤「開始」按鈕到「搜索」
- 12. 使用移動鍵盤搜索按鈕
- 13. IBM Worklight 6.1 - 如何檢查連接類型?
- 14. 我如何解僱鍵盤上關於UISearchBar的鍵盤上的搜索按鈕?
- 15. IBM Worklight 6.1 - iOS 7(iPad)WebView將高度擴展爲分離鍵盤的大小
- 16. 如何禁用/啓用UISearchBar鍵盤的搜索按鈕?
- 17. 如何收聽searchView中的鍵盤搜索按鈕
- 18. 如何刪除android中的搜索按鈕軟鍵盤?
- 19. 如何有iOS的搜索欄鍵盤搜索按鈕執行一個動作
- 20. 在搜索欄鍵盤禁用「搜索」按鈕
- 21. 如何在鍵盤上創建動作來搜索按鈕?
- 22. 使用搜索查看時隱藏軟鍵盤上的搜索/搜索按鈕?
- 23. Shake Detection - IBM Worklight 6.1 Android插件
- 24. IBM Worklight 6.1 - 這是什麼標誌?
- 25. IBM Worklight 6.1- [錯誤] FWLSE0020E和[錯誤] FWLSE0117E
- 26. 檢測鍵盤按下
- 27. 如何檢測iPhone中按下的鍵盤按鍵?
- 28. 如何檢測iPad用戶點擊鍵盤隱藏按鈕?
- 29. IBM Worklight 6.1 - 作爲JavaScript項目創建的Worklight項目
- 30. IBM Worklight 6.1 - 導入Worklight v5.0.5項目時的遷移錯誤
如果我的回答幫助解決您的問題,請標記爲回答。 –