Geo*_*ros 18 html javascript onchange mobile-safari
有谁知道这方面的任何变通办法?我正在尝试使用select元素进行导航.它看起来像这样;
<select onchange="window.location=(this.options[this.selectedIndex].value)">
Run Code Online (Sandbox Code Playgroud)
它适用于所有桌面浏览器,也适用于我的WP7手机.它在我的iPhone(iOS 5.0)上不起作用.
Pau*_*ish 28
change当您更改输入值时,iOS往往不会触发事件.我已经在Device-Bugs跟踪器中更深入地记录了这一点.
解决方法是绑定到blur事件.在上面的示例中,使用onblur并且您将全部设置.
<select onblur="window.location=(this.options[this.selectedIndex].value)">
Run Code Online (Sandbox Code Playgroud)