且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用ajax/json从数据库检索信息? (jQuery周日历)

更新时间:2023-02-16 19:24:21

如果您的php页面运行正常,则应返回事件数组.因此,可变结果将是该数组.然后,您可以创建结构{events:result}并将其传递到您的日历.

if your php page is working properly, it should return an array of events. So the variable result would be that array. You can then create the structure {events: result} and pass it to your calendar.

success(result){
    var myData = {events: result};//now you have your data in correct format.
}