繁体   English   中英

有没有一种方法可以使用jquery和触发操作来检测ios <>表单导航按钮?

[英]Is there a way to detect the ios < > form navigation buttons using jquery and trigger actions?

我正在尝试创建一个窗体,当按下下一个和上一个(<>)窗体导航按钮时,它们会被检测到并且可以触发各种操作,例如触发引导程序模式并专注于第一个输入元素,或者打开可折叠的元素,而不会关闭虚拟键盘,因此表单导航看起来很自然。

有什么办法可以检测到这一点? 我一直在找几个小时都没有运气...

您应该使用焦点或模糊事件侦听器(或同时使用两者)。

$('.your-input').bind("focus blur",function(event){

         event.type; // This will either be focus or 
                     // blur depending on wether you just came 
                     // or left from this input

         // do stuff

});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM