在dev模式下运行google web apps脚本,但不能在exec模式下运行 [英] Run google web apps script alright in dev mode but not in exec mode
问题描述
我有一个名为displayhtmlfromquerystring的脚本项目,
脚本文件是
function doGet(e){
var html;
if(e.parameter.html)
html = e.parameter.html;
else
html =Error no html;
返回HtmlService.createHtmlOutput(html +< hr />);
}
我已经将它部署为web应用程序,google给了我两个链接, dev,一个以exec结尾。
当使用dev链接运行脚本时,它是正常的,但是在使用exec链接运行时,页面显示唯一的单词未定义,我被卡住了,有谁能告诉我为什么?
我的脚本应用程序链接 https://script.google.com/macros/s/AKfycbyinAHBmjVgKDinY-bCcwQ4bgy87KuibiflG1158qRkBJSSXeMk/exec
<
在对代码进行任何更改时,您应该转到发布>部署为Web应用程序,选择一个新版本并点击更新。
现在最新的更改也可以在/ exec页面上获得。
I have a script project called displayhtmlfromquerystring,
the script file is
function doGet(e){
var html;
if(e.parameter.html)
html=e.parameter.html;
else
html="Error no html";
return HtmlService.createHtmlOutput(html+"<hr/>");
}
I have deployed it as web apps, google gave me two links, one ends with "dev" and one ends with "exec".
When run script with dev link, it is alright but when run with exec link the page displayed the only word "undefined", I got stuck, could any one tell me why?
Link of my script app "https://script.google.com/macros/s/AKfycbyinAHBmjVgKDinY-bCcwQ4bgy87KuibiflG1158qRkBJSSXeMk/exec"
The /dev links only work when you are logged in your Google account.
When making any changes to your code, you should go to Publish > Deploy As Web App, select a new version and click Update.
Now the latest changes would be available on the /exec page as well.
这篇关于在dev模式下运行google web apps脚本,但不能在exec模式下运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!