jquery autocomplete javascript, php and mysql
jquery autocomplete javascript, php and mysql
我正在尝试让 Jquery 自动完成像 http://jqueryui.com/demos/autocomplete/一样工作
所以我下载了参考资料并包含它们:
<link rel="stylesheet" type="text/css" media="all" href="jquery-ui-1.8.18.custom.css" />
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>
使用这个短代码:
<script language="javascript" type="text/javascript">
$(document).ready(function()
{
$('#auto').autocomplete(
{
source: "./file.php",
minLength: 3
})
.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( item.auto )
.appendTo( ul );
};
})
</script>
但是我一直收到此错误:自动完成不是一个函数
我不知道我的错在哪里!
你缺少jquery-ui.js
我遇到了同样的问题。 我添加了jquery-ui.js 那个错误消失了。
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
相关文章:
- JavaScript Arrays and MySQL
- Mysql and onbeforeunload
- Interfacing html, javascript, php and mysql
- chartJs with MySQL and PHP
- filtet data by checkbox using jquery ajax mysql and php
- jQuery $.each loop and json mysql data
- jade, express, and mysql results
- module.exports scope and node-mysql
- Javascript and PHP promt for MySQL
- Working with Node and MySQL
- JavaScript, PHP and MySQL
- jQuery UI Autocomplete append with PHP and MySQL
- jquery autocomplete javascript, php and mysql
- Order ofQuery with AJAX PHP and MySQL
- PHP AJAX and MySQL
- Javascript, PHP and MySQL relations
- $jquery.post() PHP and Mysql
- javascript and MySQL tables
- PHP, AJAX, and Mysql
- node-webkit and mysql queries