开发者

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.

  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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜