求 jquery autocomplete 和数据库 连接,即数据来自数据库??急急急
jquery autocomplete 代码:
以下代码里面的搜索是写死的,我想根据输入的内容去到数据库里面查询,数据库是 mysql 的,开发环境是php
html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script></script>
<script></script>
<script><br> var websites = [<br> "上海","海浪", "北京", "广州", "Sogou", "Baidu", "Tencent", <br> "Taobao", "Tom", "Yahoo", "JavaEye", "Csdn", "Alipay"<br> ];<br> $().ready(function() {<br> $("#website").autocomplete(websites); <br> });<br> <br> </script>
<script><br> $().ready(function() {<br> <br> function findValueCallback(event, data, formatted) {<br> $("#content").html("<strong>"+(!data ? "No match!" : "Selected: " + formatted)+"");<br> }<br> <br> $("#website").autocomplete(websites,{<br> minChars: 0,<br> max: 5,<br> autoFill: true,<br> mustMatch: true,<br> matchContains: true,<br> scrollHeight: 220,<br> formatItem: function(data, i, total) { <div class="clear"> </script>









