2
我正在使用下面的jQuery代碼在我的控制器CS中調用ajax函數。搜索是功能名稱。如何在控制器中調用該函數。但我應該在這個函數內頁面的文本框中獲得一個值。基本上這是爲了自動完成功能。在關鍵的功能被稱爲。但我無法獲得文本框中的值來做相關搜索。請回復您認爲對我有幫助的任何事情。提前致謝。Ajax調用控制器中的php函數
$(document).ready(function(){
$("#searchusers").autocomplete("http://localhost/CS/index.php/search" , {
width: 500,
selectFirst: false
});
});
$(document).ready(function(){
$("#searchusers").result(function(event, data, formatted) {
if (data)
$(this).parent().next().find("input").val(data[1]);
});
$('#set1 *').tooltip();
$('#firstname').tooltip();
});