【问题标题】:Google Doc - how to remove the header while using it in iframe?Google Doc - 如何在 iframe 中使用标题时删除标题?
【发布时间】:2014-05-14 05:46:08
【问题描述】:

如何删除或隐藏此页眉部分:(放大、缩小、页码、后退、下一个、弹出)

使用此方法时:

<iframe src="http://docs.google.com/gview?url=http://www.webiste.com/pdffiles.pdf&embedded=true" 
style="width:750px; height:5190px;" frameborder="0"></iframe>   

【问题讨论】:

    标签: javascript iframe google-docs google-docs-api google-document-viewer


    【解决方案1】:

    您必须在 javascript 中定位每个元素并隐藏它们。

    function hideelements() {
         document.getElementById('element id which you want to hide').style.dispaly = 'none';
    }
    

    这是可以帮助您的 javascript 代码。你必须在加载事件时调用函数,这样它就会隐藏你的元素。

    【讨论】:

    • 但是那个工具栏在 iframe 里面,那么你怎么能从主页进入 iframe 里面并隐藏它呢? iframe 也在浏览外部 Web URL(如果 URL 不是本地 URL,某些浏览器安全原因不允许修改 iframe)
    猜你喜欢
    • 2015-04-28
    • 1970-01-01
    • 2019-01-28
    • 2017-12-25
    • 1970-01-01
    • 2018-04-27
    • 1970-01-01
    • 2021-09-17
    • 2012-01-31
    相关资源
    最近更新 更多