这是我的代码
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); } 没有方法'post'
但同样的方法适用于我以前的项目....任何人都可以打电话给我吗?