google-apps-script - 可以在谷歌脚本中设置一个标题

标签 google-apps-script

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

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


enter image description here


请帮我给应用添加标题。

最佳答案

使用setTitle() .

function doGet() 
{
  return HtmlService.createHtmlOutput('Hello, world!')
         .setTitle('Hello Title');
}

关于google-apps-script - 可以在谷歌脚本中设置一个标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38542820/

相关文章:

google-apps-script - 测试自动化 Google Apps 脚本 Gmail 附加组件

javascript - 在Google脚本中获取数组中的元素

google-apps-script - 如何在 Google Apps 脚本中使用 oAuth 2.0 来授权 Picasa 网络相册

google-apps-script - Google Sheets importData、importRange 速度/间隔 - 改进方法?

google-apps-script - 通过选中复选框触发功能

google-apps-script - 仅查看用户的 onOpen 触发器

javascript - 检查/引用空数组值(Google App 脚本)

javascript - 如何在javascript中使用href?

javascript - 使用 Google Apps 脚本将文本文件上传到 Google 云端硬盘

javascript - Google App Script 中同时多次提交