代码适用于台式机和移动设备但不适用于iPhone和三星

时间:2017-07-12 13:04:14

标签: javascript jquery

此代码适用于桌面但不适用于iOS手机请帮助

<html>
<style type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript">
  $(document).ready(function() {
        $("#NextBut").removeAttr("onclick");
        
          var arr1=["ABOP","ABOF",hion","Afbo","afof","all about fashion.com","ablout all fashion","all abot fashion","all abot fasion"];
          var arr2 = ["Ajio", "Ajio", "Aajio", "Ageo", "Ajiyo", "Ajiyoo", "Ageoo", "Aji", "Ajo", "Agio", "Ageo", "Ajioo", "Ajiooo"];
          $("#NextBut").click(function() {
            var res = 0;
            var v1 = $.trim($("input[name='BH11']").val());
            for (var i = 1; i < 31; i++) {
              if (i == 1) {
                for (var j = 0; j < arr1.length; j++) {
                  if (v1.toLowerCase() === arr1[j].toLowerCase()) {
                    res = i;
                  }
                }
              }
              if (i == 2) {
                for (var j = 0; j < arr2.length; j++) {
                  if (v1.toLowerCase() === arr2[j].toLowerCase()) {
                    res = i;
                  }
                }
              }
            }
            if (res > 0) {
              res = res - 1;
              $("table.SRTable tr").eq(res).find("input:radio").prop("checked", "true");
            } else {
              $("table.SRTable tr").eq(2).find("input:radio").prop("checked", "true");
            }
            NextPage(true);
          });
        }

      );
</script>

</html>

0 个答案:

没有答案