【发布时间】:2016-09-03 17:21:44
【问题描述】:
我正在尝试制作我的第一个 Google 应用。我有我的 HTML 文档,其中包含 HTML Service: Best Practices 中概述的 include 语句。
<html>
<head>
<base target="_top">
<?!= include('stylesheet') ?>
</head>
<body>
...
</body>
我的code.gs文件如下:
function doGet() {
return HtmlService.createTemplateFromFile('BooksTS2.html')
.evaluate();
}
我的样式表被命名为 stylesheet.html,并且为了测试目的非常简单:
<style>
p {color: green;}
</style>
但是当我运行它时,我得到这个错误信息:ReferenceError: "include" is not defined.
【问题讨论】:
标签: html css google-apps-script