I can't figure it out how I can get the HTML to process the extension/caller (scriptlets) that look like this <?= var data = getData()?>
. Here is my script code link .
From my answer here :
If you have the <?...?>
scriptlets in your HTML file when you evaluate with the HTMLService you need to use createTemplateFromFile()
otherwise they will be treated as plain text. The createHTMLOutputFromFile()
won't work for evaluating the script tags.
function doGet() {
return HtmlService.createTemplateFromFile('Index').evaluate();
}
You should take a look at the HTMLService best practices for async loading.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.