0

我收到错误“缺少;声明之前。(第 2 行,文件“代码”)”。我不是程序员,但我发现了一个代码,可以让我在 G Form 上嵌入 G Cal。所以,请温柔:)

期待谢谢!

//this is the ID of the calendar to add the event to, this is found on the calendar settings page of the calendar in question
02  var calendarId = XXXXXXXXXXXX@group.calendar.google.com;
03   
04  //below are the column ids of that represents the values used in the spreadsheet (these are non zero indexed)
05  var startDtId = 4;
06  var endDtId = 5;
07  var titleId = 3;
08  var descId = 2;
09  var formTimeStampId = 1;
4

2 回答 2

1
//this is the ID of the calendar to add the event to, this is found on the calendar            settings page of the calendar in question
02  var calendarId = "XXXXXXXXXXXX@group.calendar.google.com";
03   
04  //below are the column ids of that represents the values used in the spreadsheet (these are non zero indexed)
05  var startDtId = 4;
06  var endDtId = 5;
07  var titleId = 3;
08  var descId = 2;
09  var formTimeStampId = 1;
于 2013-10-04T08:12:13.857 回答
0

字符串(非数字)值必须用引号括起来...

var calendarId = "XXXXXXXXXXXX@group.calendar.google.com";

另外,看看 Boris the Spider(有趣的用户名 :) 在关于行号的问题评论中所说的话。

于 2013-10-04T08:10:53.570 回答