打开使用JS在Android的网络浏览器选择框 [英] Opening a select box using js in Android web browser

查看:116
本文介绍了打开使用JS在Android的网络浏览器选择框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个标准的<选择> 并想打开它时,另一个元素上的用户点击。这是pretty在普通浏览器,甚至在iPhone上简单,但由于某些原因没有工作在Android上。

I have a standard <select> and would like to open it when a user clicks on another element. It's pretty simple in a regular browser and even on the iphone, but for some reason nothing working on Android.

我试过点击焦点事件,也试图改变选择的大小属性,但这些都不奏效。

I've tried the click and focus events, and also tried changing the size attribute of the select but none of these worked.

有没有人做到了这一点?

Has anyone accomplished this before?

推荐答案

等是否输入增益重点是什么?

Does other input gain focus?

这个简单的HTML选择例子并在浏览器中正常工作:
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option 看看你的手机。

This simple html select example does work fine in the browser: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option check it out on your mobile.

如果你在你的应用程序测试,我觉得你的WebView脱焦。简单的纯选择Android浏览器不工作。如果你在自己的WebView希望的JavaScript你必须启用它。

If you are testing in your application, I think your webview is out of focus. A simple plain select does work on android browser. If you want in your own webview javascript you have to enabled it.

这篇关于打开使用JS在Android的网络浏览器选择框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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