2013-07-03 48 views
1

我想提出一個網站,但我不能讓工作在IE 10這個jQuery插件這是我的頭部代碼:jQuery UI的自動完成不工作的IE10

<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> 

這是對象的標記代碼:

<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:

<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> 
+2

你在IE10上運行你的網站時是否有任何控制檯錯誤? –

+1

你是否試圖在JavaScript中運行PHP代碼? – Pitchinnate

+0

這對我來說真的很像PHP。 –

回答

4

的問題的答案是,添加以下代碼行的文件頭:

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

現在在IE10上效果很好

0

Javascript =客戶端。

Php =服務器端。

你不能將它們按照你使用的方式組合