是否可以在 google 应用程序脚本中将图像放入警报中?

Is It possible to put images in alerts in google app script?

我听说您无法在 JavaScript 中将图片放入警告框,App Script 是否也一样,如果不是,您将如何插入图片?

您可以根据自己的喜好将 'alert window' 设置为 html/css。例如:

function main() {
  var html = `
  <center><img src="https://www.gstatic.com/script/apps_script_1x_48dp.png" /></center>
  <p class="body" style="font-family: sans-serif; color:gray; text-align:center">
  Please wait whilst we process your request,
  this may take several minutes.
  Please do not refresh your page during this time.
  Thank you...</p>
  `
  var htmlOutput = HtmlService
      .createHtmlOutput(html)
      .setWidth(350)
      .setHeight(300);

  SpreadsheetApp.getUi().showModalDialog(htmlOutput, 'Running Request');
}