可以在谷歌脚本中设置标题吗

Max*_*Max 1 google-apps-script

function doGet() 
{
  return HtmlService.createHtmlOutput('<b>Hello, world!</b>');
}
Run Code Online (Sandbox Code Playgroud)

我尝试<title>在 html 表单中使用,用它代替“Hello, world!” 但它保持不变,该应用程序看起来很有趣,标题上带有 google 脚本 url。


在此处输入图片说明


请帮我为应用添加标题。

小智 8

使用setTitle()

function doGet() 
{
  return HtmlService.createHtmlOutput('Hello, world!')
         .setTitle('Hello Title');
}
Run Code Online (Sandbox Code Playgroud)