프로그래밍/Javascript & JQuery
[jQuery]자동 완성 기능!
bbuljj
2014. 3. 7. 11:32
$(function() {
$("#searchValue").autocomplete({
source : function(request, response) {
$.ajax({
url : "/Board/AutoComplete",
dataType : "json",
data : {
term : request.term
},
success : function(json) {
response($.map(json, function(data){
return{
label : data.TITLE,
value : data.TITLE
};
}));
},
error : function(json){
alert("err" + json);
}
});
},
});