var CollectionForAutoComplete = new Array();
function AutoCompleteTextBox() {
var data = CollectionForAutoComplete;
//var ac = $("#setcommonelement_ElementName").autocomplete(data);
//ac.disable();
// ac.setOptions({ noCache: true });
$("#setcommonelement_ElementName").autocomplete(data, {
minChars: 0,
width: 262,
matchContains: "word",
scrollHeight: 220,
cacheLength: 0
});
}
function generateStringForAutoComplete(CommonElementCollectionlist) {
if (CommonElementCollectionlist.length > 0) {
CollectionForAutoComplete.length = 0;
for (i = 0; i < CommonElementCollectionlist.length; i++) {
CollectionForAutoComplete.push(CommonElementCollectionlist[i].ElementName);
}
}
}
在運行時我已加載集合並將集合推入jquery autocomplet。但緩存不是空的。請告訴我如何清除緩存...........刪除jquery自動完成緩存
不會`$(「#element」)。unautocomplete()。autocomplete(newData)`也可以嗎? – kay 2012-07-13 13:20:49