這是我的代碼。它可以很好地獲取數據和解析,但我無法顯示事件。請讓我知道可能的原因。在Asp.Net中使用webservices的JQUERY中的完整日曆
我覺得回調(事件)在這裏不起作用。
events: function(callback)
{
$.ajax({
type: "POST",
url: "WebService.asmx/hello",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data)
{
var evnt = [];
$(data.d).find('event').each(function()
{
evnt.push({
// title: $(this).attr('title'),
// start: $(this).attr('start'),
// end: $(this).attr('end')
title: 'Events1',
start: '2010-04-01',
end: '2010-04-10'
});
});
alert('called end');
callback(evnt);
},
error: OnError
});
}