安卓4.0,如何关闭在更改事件选择面板 [英] Android 4, how to close select panel on change event

查看:153
本文介绍了安卓4.0,如何关闭在更改事件选择面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安卓4.0的HTML选择元素打开面板采用了完成按钮。用户可以选择一个元素,然后单击完成关闭面板。当用户选择不当DONE按钮是pressed的要素之一发生了Javascript的更改事件。我想以编程方式关闭面板上的更改事件,不必点击完成按钮保存用户。

On Android 4 the html select elements open a panel with a "Done" button. User can pick one element and then click "Done" to close the panel. The Javascript change event occurs when the user picks one of the elements not when the Done buttons is pressed. I would like to programmatically close the panel on the change event, saving the user from having to tap the Done button.

我试图发送焦点等元素,也做了选择元件上的模糊,但它不能正常工作。

I have tried sending focus to other elements and also doing a blur on the select element, but it doesn't work.

任何想法?

推荐答案

调用选择元素的模糊()的作品在我的手机: Android的浏览器4.1.2和 移动Safari浏览器6.0

Calling "blur()" on the select-element works on my Phones: Android-Browser 4.1.2 and Mobile Safari 6.0

$('#mySelect').change(function(){
    this.blur();
});

这篇关于安卓4.0,如何关闭在更改事件选择面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆