问题描述
我正在致电UrlFetchApp.fetch("www.google.com")
I am calling UrlFetchApp.fetch("www.google.com")
从我的chrome javascript代码中,我得到了:
from my chrome javascript code and I am getting:
任何人都知道为什么未定义它吗?我以为它是内置的.
Anyone know why it is not defined? I thought it was built in.
推荐答案
URL提取服务及其 UrlFetchApp类是 Google Apps脚本的一部分-一种基于javascript的服务器端脚本语言,它允许您可以通过自定义功能扩展Google Apps产品,例如文档,表格和表格.
URL Fetch Service and its UrlFetchApp class are part of Google Apps Script - a javascript-based server-side scripting language that allows you to extend Google Apps products like Docs, Sheets and Forms with custom functionality.
UrlFetchApp类在客户端javascript中不可用,这就是您要尝试执行的操作.您只能在服务器端Google Apps脚本.gs文件中使用它.
UrlFetchApp class is NOT available in client-side javascript, which is what it looks like you are trying to do. You can only use it in server-side Google Apps Script .gs files.
这篇关于未定义UrlFetchApp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!