未定义UrlFetchApp [英] UrlFetchApp is not defined

查看:86
本文介绍了未定义UrlFetchApp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在致电UrlFetchApp.fetch("www.google.com")

I am calling UrlFetchApp.fetch("www.google.com")

从我的chrome javascript代码中,我得到了:

from my chrome javascript code and I am getting:

未捕获的ReferenceError:未定义UrlFetchApp

Uncaught ReferenceError: UrlFetchApp is not defined

任何人都知道为什么未定义它吗?我以为它是内置的.

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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