0
的jQuery:的jQuery UI的自動完成數據未顯示
function search($id, $column) {
$("#" + $id).autocomplete({
source: function(request, response) {
jQuery.post("<?php echo base_url().'index.php/Auto_complete/item_search'?>", {
Query: request.term,
column: $column
}, function(data) {
response(data);
});
}
});
}
HTML:
<input type="text" class="form-control English_name" id="English_name" name="English_name" placeholder="Enter Item Name (English)" onchange="product_name()" onkeyup="search('English_name', 'English_name')" autocomplete="off">
AJAX輸出:
["Styler King 6 Card Holder (Set of 1, Khaki)","ds 18 sticker","famous sticker","wx sticker","lk small sticker","LX Sticker"]
任何人都可以請幫我爲什麼數據沒有顯示和如何我可以在jQuery UI自動完成中顯示數據嗎?