小编Max*_*ini的帖子

在javascript中使用API​​ v3检索Google日历事件

去年我使用http://gdata-javascript-client.googlecode.com/svn/trunk/samples/calendar/simple_sample/simple_sample.html中的代码从公共Google日历的"现在"检索所有事件,然后在网页中显示结果.我修改了该代码以满足我的需求(请参阅下面的代码).

现在,使用API​​ v3,代码不再起作用,我无法理解代码的哪些行已被弃用以及如何更新它们.请问有人帮我这个代码吗?

非常感谢 :-)

<body>

<script type="text/javascript" src="http://www.google.com/jsapi?key=YOUR_KEY_HERE"></script>
<script type="text/javascript">

/* Loads the Google data JavaScript client library */
google.load("gdata", "2.x");

function init() {
  // init the Google data JS client library with an error handler
  google.gdata.client.init(handleGDError);
  // load the code.google.com calendar
  loadMyCalendar();
}
/**
 * Loads the Google Event Calendar
 */
function loadMyCalendar() {
  loadCalendarByAddress('MY_ADDRESS@gmail.com'); /* address here
}

/**
 * Adds a leading zero to a single-digit number.  Used for displaying dates.
 */
function padNumber(num) …
Run Code Online (Sandbox Code Playgroud)

javascript jquery calendar google-calendar-api

5
推荐指数
1
解决办法
2万
查看次数