开发者

Jquery UI autocomplete wont work

Jquery UI autocomplete wont work,what could be wrong?Here is the code.Thank you

    <head>
        <meta http-equiv="Content-Type" cont开发者_StackOverflowent="text/html; charset=utf-8" />
        <title>Homepage</title>
        <script type="text/javascript" src="lib/jquery/jquery-1.4.2.js"></script>
         <script type="text/javascript" src="lib/jquery/jquery-ui-1.8.10.custom.min.js"/>
         <link rel="stylesheet" type="text/css" href="/jquery-ui-1.8.10.custom.css"/>
         <link rel="stylesheet" type="text/css" href="/stylez.css"/>
         <script type="text/jscript">
            $(document).ready( function(){
          $('.searchfield').autocomplete({source:["salim","keli","ally"]});
    }); 
    </script>

    </head>
    <body>
<div>
            <label><b>Search</b></label>
            <input type="text" class="searchfield" size="52"/>
            </div>
</body>
</html>


<script type="text/jscript"> => <script type="text/javascript">

also the script tag is not self closing. You always need to provide a closing </script> tag.

Live demo here.


The second <script> tag needs the closing tag:

<script type="text/javascript" src="lib/jquery/jquery-ui-1.8.10.custom.min.js"></script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜