使用Jquery插件fullcalendar日程表把任务表数据显示到日历日程表
$('#calendar').fullCalendar({
events: function(start,end, callback) {
$.ajax({
url:'myxmlfeed.php',
dataType: 'xml',
data: {
// ourhypothetical feed requires UNIX timestamps
start:Math.round(start.getTime() / 1000),
end: Math.round(end.getTime()/ 1000)
},
success:function(doc) {
var events =[];
$(doc).find('event').each(function() {
events.push({
title:$(this).attr('title'),
start:$(this).attr('start') // will be parsed
});
});
callback(events);
}
});
}
});
它这里的 dataType :XML 我不太了解, 我不知道用什么方式将数据读出来, 然后循环到 里面..