-2
我有一個AJAX功能返回的日期,我不能把這個日期...日期從數據庫返回,並把它放在一個數組
var dates = [];
$.ajax({
type : "POST",
url : "agenda.php?action=getData",
success: function(data){
dates.push(data);
}
});
console.log(dates); // here prints [] .... =/ .... and i made other test i put var dates = [] outside of $(document).ready... and nothing
'agenda.php?action = getData'返回什麼? – 2014-12-07 20:42:24
返回像2014/12/20的簡單日期....如果我可以使它工作...我將返回一個json – 2014-12-07 20:47:29
發佈PHP代碼 – 2014-12-07 20:51:09