开发者

How to trigger a select box to open when a link is pressed. (HTML/iPhone/Javascript)

开发者 https://www.devze.com 2023-01-11 07:20 出处:网络
Basically, I\'m building a mobile site with LOTS of content. I have a header, then a menu with three buttons that I need to open select menus so that the iPhone\'s select wheel will appear. Any ideas?

Basically, I'm building a mobile site with LOTS of content. I have a header, then a menu with three buttons that I need to open select menus so that the iPhone's select wheel will appear. Any ideas? So far my开发者_如何学JAVA searching says not possible...


two ideas spring to mind.

  1. Use CSS style properties to set the select tags to Display:none. Use javascript to change to display:block when the button is pressed.

  2. Have a place holder div and inject the select tag using .innerHTML.

In both cases you will need to set the focus to the appropriate select tag.

0

精彩评论

暂无评论...
验证码 换一张
取 消