事件作为JSON提要,但传递额外的参数? [英] events as JSON feed, but passing extra parameters?

查看:73
本文介绍了事件作为JSON提要,但传递额外的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在示例代码中,我们可以通过传递URL从JSON提要中获取事件。
$ b

in the example code we're able to get events from a JSON feed by passing a URL.


$('#calendar ).fullCalendar({
事件: /myfeed.php});

$('#calendar').fullCalendar({ events: "/myfeed.php" });

fullCalendar将访问像一个链接这样的:/myfeed.php?start=1262332800&end=1265011200& _ = 1263178646

fullCalendar will visit a link like this: /myfeed.php?start=1262332800&end=1265011200&_=1263178646

我可以额外的参数传递到myfeed.php网址是什么? 。例如,如果我想,以限制对特定资源ID返回的事件

Can I pass extra parameters to myfeed.php url? for example if I wanted to restrict events that are returned for a specific resource id.

例如:/myfeed.php?resourceid=1&start=1262332800&end=1265011200& ; _ = 1263178646

ex: /myfeed.php?resourceid=1&start=1262332800&end=1265011200&_=1263178646

谢谢

Thanks

推荐答案

我在过去。所以你的代码应该是:

Yes this has worked for me in the past. So your code should just be:

$('#calendar').fullCalendar({ events: "/myfeed.php?resourceid=1" });

现在我只是遇到跨域问题!

Now I'm just having problems crossing domains!

这篇关于事件作为JSON提要,但传递额外的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆