【问题标题】:Why an iframe does not load when embedded into a Web App page?为什么 iframe 在嵌入到 Web 应用程序页面时不加载?
【发布时间】:2012-08-03 20:19:32
【问题描述】:

我尝试将此 html 代码加载到 Google 脚本中:

<iframe src="http://www.w3schools.com"></iframe>

保存名为“page”的文件,然后在 Google 脚本中使用它:

function doGet() { return HtmlService.createHtmlOutputFromFile('page'); }

它查看 iframe,但没有内容。我在这里遗漏了什么吗?

【问题讨论】:

    标签: html google-apps-script iframe web-applications


    【解决方案1】:

    您不能在 Apps 脚本中显示 iframe。

    【讨论】:

    • 我认为 HTML 代码没有任何问题,所以我猜你是对的。但是,如果我将 iframe 小工具添加到 google 站点并让脚本使用站点 API(getHtmlContentsetHtmlContent)处理它,它是否有效?
    • 那行得通。关键是你不能在脚本自己的内容中显示 iframe。
    猜你喜欢
    • 2010-12-24
    • 2014-03-04
    • 1970-01-01
    • 1970-01-01
    • 2020-05-16
    • 1970-01-01
    • 2019-05-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多