简体   繁体   English

下拉项目选择不适用于 iPhone

[英]Dropdown item selection not working on iphones

I'm using this code to generate a dropdown list, That is working fine on pc and android but will not work on iphone the iphone display the list but will not respond to the touch of a selected item.我正在使用此代码生成一个下拉列表,这在 pc 和 android 上工作正常,但在 iphone 上不起作用,iphone 显示列表但不会响应选定项目的触摸。 Any thought on how it could be modified to also work on the iphones关于如何修改它以在 iphone 上运行的任何想法

 <script type="text/javascript"></script>
 <script>
    <?
     var sheet   = SpreadsheetApp.openById("1GerAhvhytiKKrOUCTiavVuPRJAT9uYYRje2d85E8C-8").getSheetByName("Name Data");
     var lastRow = sheet.getLastRow();  
     var myRange = sheet.getRange("B2:B"+lastRow); 
     var data    = myRange.getValues();
    ?>

 </script>  

<div class="row"> 
  <div class="input-field">
   <i class="material-icons prefix">person</i>
    <select id="Name" >
    <option value=""  disabled selected>Select your name</option>
    <? for (var i = 0; i < data.length; ++i) { ?>
   <option ><?!= data[i] ?></option>
  <? } ?>
 </select>
</div> 

Thanks谢谢

I recall having an issue with iOS not firing the select event and me using the blur event instead:我记得有一个问题,iOS 没有触发 select 事件,而我使用了 blur 事件:

<select onblur="doSomething">

Maybe you have the same issue.也许你有同样的问题。

Edit: Check this similar question for more details.编辑:检查这个类似的问题以获取更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM