0
我有一個jumpbox應該工作在第二個選擇框上。除iPad Safari之外,此功能無處不在。任何人都可以幫助我弄清楚我需要做些什麼來實現它的工作?選擇onchange不工作在ipad safari
我已經設置了的jsfiddle:http://jsfiddle.net/lbriquet/5m7U3/1/
獨立例如:
<select name="jumpMenu" size="12" id="jumpMenu" onChange="MM_jumpMenu('window',this,document.getElementById('ORGID'),0)">
它調用的函數是:
function MM_jumpMenu(targ, selObj, selObj2, restore) { //v3.0
var url = '';
var tmp = selObj.options[selObj.selectedIndex].text;
switch (tmp) {
case 'Membership':
url = targ + ".open('" + selObj.options[selObj.selectedIndex].value + selObj2.options[selObj2.selectedIndex].value + '#2' + "')";
break;
case 'Officers':
url = targ + ".open('" + selObj.options[selObj.selectedIndex].value + selObj2.options[selObj2.selectedIndex].value + '#3' + "')";
break;
case 'Liaisons':
url = targ + ".open('" + selObj.options[selObj.selectedIndex].value + selObj2.options[selObj2.selectedIndex].value + '#4' + "')";
break;
case 'Subcommittees and WG':
url = targ + ".open('" + selObj.options[selObj.selectedIndex].value + selObj2.options[selObj2.selectedIndex].value + '#1' + "')";
break;
default:
url = targ + ".open('" + selObj.options[selObj.selectedIndex].value + selObj2.options[selObj2.selectedIndex].value + "')";
break;
};
eval(url);
if (restore) selObj.selectedIndex = 0;
http://fiddle.jshell.net/lbriquet/5m7U3/1/show/
使用電平變化的選擇框
}
http://stackoverflow.com/questions/19475814/javascript-on-change-event-is-not-firing-in-safari-after-selecting-the-dropdown的可能的複製 – Hazaart
這是不必不可少的是它打開了一個新的窗口,這是另一個問題的主題...... :) – lbriquet