1
不工作這是我的代碼
var citylist = [];
var index = 0;
var url = "http://test.com/index.php";
var posting = $.post(url, { keystring: ""});
posting.done(function(data) {
$.each(data, function(key, value) {
console.log(data);
$.each(data, function(key, value) {
citylist[index] = value;
index++;
});
if (index > 0) {
$("#destination_to").autocomplete({source: citylist});
}
});
,但我發現了以下錯誤
Uncaught TypeError: Object function (e,l){return document.id(e,l,this.document); } has no method 'post'
但同樣的方法爲我以前的項目工作正常.. ..任何人都可以打電話給wat shud做?
看起來你的頁面存在_ $ _衝突,請嘗試使用'jQuery'而不是'$'。 – undefined
jQuery甚至包括正確? –
[非常奇怪的jQuery錯誤]的可能重複(http://stackoverflow.com/questions/13708465/very-weird-jquery-error) – undefined