ReferenceError: “document” is not defined

后端 未结 2 860
清歌不尽
清歌不尽 2021-01-23 05:43

Im new to JavaScript and even more new to Google Apps Script. Im trying a simple function that shows the current date (only day, month e and full year), but the Google Script sh

2条回答
  •  無奈伤痛
    2021-01-23 06:31

    Code running as a Google Apps Script does not run in the browser, so you cannot use web browser APIs with it. If you want to output content to a Google Site, then you need to use the API for Sites.

    Presumably you would want something like createWebPage and then use the methods on the resulting object to add the content to it.

提交回复
热议问题