自動(dòng)完成不起作用我想從mysql數(shù)據(jù)庫(kù)(如google option)中獲取數(shù)據(jù)我的文件不起作用,當(dāng)我們從摘要選項(xiàng)中按下選擇數(shù)據(jù)時(shí)不顯示任何東西 <!DOCTYPE html> <html> <head> <title></title> <!--my file not working auto complete address from database--> <!--code inclide file of botstarp --><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.2/bootstrap3-typeahead.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <!--code of auto fetch--> <script> $(document).ready(function () { $('#Country').typeahead({ source: function (query, result) { $.ajax({ url:"autoselect_jquery5.php", data:'query=' + query, dataType:"json", type:"POST", success: function (data) { result($.map(data, function (item) { return item; })); } }); } }); }); </script> </head> <body> div class="container" style="width:600px;"> <h2 align="center">Autocomplete Textbox using Bootstrap Typeahead with Ajax PHP</h2> <label>Search Country</label> <input type="text"name="country"id="country"autocomplete="off"placeholder="Country" /> </div> </body> < /html>
- 1 回答
- 0 關(guān)注
- 153 瀏覽
添加回答
舉報(bào)
0/150
提交
取消