我正在尝试使用Google Form API。当我尝试使用FormApp.openByUrl()
时。但我得到了一个ReferenceError
。这是我的代码:
我已经尝试导入API了。但它没有用。
<html>
<head>
<title>Test</title>
<script src="https://apis.google.com/js/api.js"></script>
</head>
<body>
<script>
var form = FormApp.openByUrl('https://docs.google.com/forms/d/SOME-FORM/edit');
var formResponses = form.getResponses();
</script>
</body>
</html>
控制台输出:
Uncaught ReferenceError: FormApp is not defined
at (index):9
(anonymous) @ (index):9
它应该什么都不做,但它会抛出异常。