簡體   English   中英

Jquery UI自動完成不適用於IE10

[英]Jquery UI Autocomplete Not Working on IE10

我正在建立一個網站,但我無法在IE 10上使用這個Jquery插件。這是我的HEAD代碼:

  <head>

      <link rel='stylesheet' type='text/css' href='/style/Style.css'>
      <link rel='stylesheet' href='http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' />
       <script src='http://code.jquery.com/jquery-1.9.1.js'></script>
       <script src='http://code.jquery.com/ui/1.10.3/jquery-ui.js'></script>
       <script>
          $(document).ready(function() {
              var availableTags = [";

              while($row5 = mysqli_fetch_array($result)) {
                echo "'" . $row5['solicitante'] . "',";
               }
                mysqli_close($con);

            echo "];
                  $( '#tags' ).autocomplete({
                    source: availableTags
                  });
                });
                </script>

</head>

這是TAGS代碼的對象:

 <form action="../procesar/procesar_nombre.php" method="post">
        <table>
            <tr>
                <td> <b>Nombre</b> <td>
                <td> <input id="tags" type="text" name="nombre" size=30 maxlength=20/> </td>
            </tr>
            <tr>
                <td>  </td>
                <td> <input type="submit" value="Revisar"> </td>
            </tr>
        </table>
    </form>

這在谷歌瀏覽器上運行得很好,但在IE10中沒有,我嘗試研究有關情況但卻沒有答案。

對於那些沒有得到我想要做的事情的人來說,頁面的來源在Web瀏覽器上看起來像這樣。 頭:

   <head>

            <link rel='stylesheet' type='text/css' href='/style/Style.css'>
            <link rel='stylesheet' href='http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' />
            <script src='http://code.jquery.com/jquery-1.9.1.js'></script>
            <script src='http://code.jquery.com/ui/1.10.3/jquery-ui.js'></script>
            <script>
                $(document).ready(function() {
                  var availableTags = ['Maria F Romero','Carla Custodio','Julio Cesar Pacheco','Dorimar Balza','Miguel Morales','Johana Rodriguez','Oswaldo Zarate','sinnombre','Ronald Grimaldo','Gerardo Leon','Gelenny Lara',];
                  $( '#tags' ).autocomplete({
                    source: availableTags
                  });
                });
                </script>

</head>

這是對象:

  <form action="../procesar/procesar_nombre.php" method="post">
        <table>
            <tr>
                <td> <b>Nombre</b> <td>
                <td> <input id="tags" type="text" name="nombre" size=30 maxlength=20/> </td>
            </tr>
            <tr>
                <td>  </td>
                <td> <input type="submit" value="Revisar"> </td>
            </tr>
        </table>
    </form>

問題的答案是在文檔的頭部添加以下代碼行:

 <meta http-equiv='X-UA-Compatible' content='IE=Edge'>

現在它在IE10上運行良好

Javascript =客戶端。

Php =服務器端。

您不能以您使用的方式組合它們

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM