gpt4 book ai didi

jQuery FullCalendar 不解析 json

转载 作者:行者123 更新时间:2023-12-01 05:55:38 24 4
gpt4 key购买 nike

我的 FullCalendar jQuery 看起来像这样:

$(document).ready(function () {

$('#calendar').fullCalendar({

events: {
url: '/admin/index.php',
type: 'GET',
data: {
m: '1',
e: 'fetchCalEvents'
},
error: function () {
alert('there was an error while fetching events!');
},
color: 'yellow',
textColor: 'black'
}

});

如果我点击测试网址:

http://localhost/admin/index.php?m=1&e=fetchCalEvents

我得到了好看的 JSON:

[{"id":"13","title":"Test Entry","start":"2013-04-20 04:20:00","end":"2013-04-20 05:20:00","url":"#","allDay":false}]

但令人恼火的是,日历仅弹出:

There was an error while fetching events!  

这并没有告诉我太多信息。有什么方法可以让这个插件更好地处理错误吗?我在文档中没有看到任何内容。知道出了什么问题吗?

:(

最佳答案

试试这个 Solution

查看官方文档也许可以回答您的问题

关于jQuery FullCalendar 不解析 json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16045363/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com