How to trigger a select box to open when a link is pressed. (HTML/iPhone/Javascript)
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.
Use CSS style properties to set the select tags to Display:none. Use javascript to change to display:block when the button is pressed.
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.
精彩评论