jQuery autocomplete()无法正常工作 [英] jquery autocomplete() is not working

查看:73
本文介绍了jQuery autocomplete()无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<link rel="stylesheet" type="text/css" href="jquery-ui-1.8.2.custom.css" />
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>


<body>
Search: <input id="example" /> 
</body>

<script>
$(document).ready(function(){
var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
$("#example").autocomplete(data);
});
</script>

推荐答案

由于您的示例直接来自自动填充插件页面,我猜这是您尝试使用的插件.您需要下载它并将其放置在代码可以使用它的地方.

Since your example is straight from the Autocomplete plugin page, I'm guessing that's the plugin your attempting to use. You'll need to download it and put it someplace where your code can use it.

<script src="http://code.jquery.com/jquery-latest.js"></script>
<!-- You'll want to change this next line to your local copy of the plugin. -->
<script src="jquery.autocomplete.js"></script> 

Search: <input id="example" /> 

<script>
$(document).ready(function(){
var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
$("#example").autocomplete(data);
});
</script>

这篇关于jQuery autocomplete()无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆