gpt4 book ai didi

javascript - 如何使用 javascript 变量分配 Google Apps 脚本变量?

转载 作者:行者123 更新时间:2023-12-01 00:16:22 25 4
gpt4 key购买 nike

如何使用 JavaScript 变量分配 Google Apps 脚本变量?

<script>
var myJSVariable = <?= myAppScriptVariable ?>; //works
<? myAppScriptVariable = ?> myJSVariable <? ; ?> // does not work

最佳答案

HTML 模板不应将任何值传递给 Apps 脚本变量。正如文档states :

Remember, however, that because template code executes before the page is served to the user, these techniques can only feed initial content to a page. To access Apps Script data from a page interactively, use the google.script.run API instead.

关于javascript - 如何使用 javascript 变量分配 Google Apps 脚本变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59734273/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com