0
我最近一直在使用另一家公司的(Markit's)API以自動完成格式從他們的數據庫中提取股票名稱,但是我的給定「列表」正在被格式化爲項目符號點而不是一個漂亮的文本框。爲什麼我的自動填充選項未格式化?
.autocomplete({
source: function(request,response) {
$.ajax({
beforeSend: function(){
},
url: "http://dev.markitondemand.com/api/Lookup/jsonp",
dataType: "jsonp",
data: {
input: request.term
},
success: function(data) {
response($.map(data, function(item) {
return {
label: item.Name + " (" +item.Exchange+ ")",
value: item.Symbol
}
}));
}
});
},
minLength: 1,
});
是否有這個javascript/jquery的問題,還是它歸結爲造型錯誤?對於輸入文本字段
我的HTML代碼是這樣...
<input id="symbolsearch" type="text" placeholder="Enter company name or symbol" autocomplete="off" ></input>
忘了,包括JQuery的UI格式CSS,讓我格式化我帶有下載主題包的JQuery小部件! 我的部分愚蠢的錯誤 – ROROROtimi