Javascript onclick <select>的<option>无法在移动设备上运行

时间:2017-10-04 13:25:55

标签: javascript jquery html android-layout mobile

它适用于普通浏览器。不适用于移动设备。 这就是我所拥有的: function processAjax(kat,div) {     如果(DIV == 1)     {         $('#DivCat1')。hide('slow',function(){});         $('#DivCat2')。hide('slow',function(){});         $('#DivCat3')。hide('slow',function(){});         $('#DivCat4')。hide('slow',function(){});         $('#DivCat5')。hide('slow',function(){});         $('#DivCat6')。hide('slow',function(){});         $('#DivCat7')。hide('slow',function(){});     }     如果(DIV == 2)     {         $('#DivCat3')。hide('slow',function(){});         $('#DivCat4')。hide('slow',function(){});         $('#DivCat5')。hide('slow',function(){});         $('#DivCat6')。hide('slow',function(){});         $('#DivCat7')。hide('slow',function(){});     }     如果(DIV == 3)     {         $('#DivCat4')。hide('slow',function(){});         $('#DivCat5')。hide('slow',function(){});         $('#DivCat6')。hide('slow',function(){});         $('#DivCat7')。hide('slow',function(){});     }     如果(DIV == 4)     {         $('#DivCat5')。hide('slow',function(){});         $('#DivCat6')。hide('slow',function(){});         $('#DivCat7')。hide('slow',function(){});     }     如果(DIV == 5)     {         $('#DivCat6')。hide('slow',function(){});         $('#DivCat7')。hide('slow',function(){});     }     如果(DIV == 6)     {         $('#DivCat7')。hide('slow',function(){});     }     如果(DIV == 7)     {         $('#DivCat8')。hide('slow',function(){});     }     $('#DivCat'+ div).show('slow',function(){});     $( '#DivCat' + DIV).load( 'katgetir.php吉=?' +吉+ '&安培; DIV =' + DIV);     $('#change')。animate({scrollLeft:500},'slow'); } &lt; select multiple class =“form-control”&gt;   &lt; option id =“45”onclick =“processAjax(45,1)”&gt; Kat&lt; / option&gt; &LT; /选择&GT;

1 个答案:

答案 0 :(得分:-2)

您正在使用Host=localhost;Username=user;Password=pass;Database=database_name;Pooling=true; ,但在移动设备上,您不会点击,而是更改父选择的值。检查此link,您会发现它也适用于移动设备。