【问题标题】:Hiding footer of the embedded webpage in iframe在 iframe 中隐藏嵌入网页的页脚
【发布时间】:2018-02-14 09:51:10
【问题描述】:

<script>
$(document).ready(function(){
    $('.mydivclass').hide();
    });
    </script>

我正在尝试使用 iframe 从我的 html 访问 Microsoft Forms。 是否可以删除微软表单的页脚。

【问题讨论】:

    标签: jquery html iframe cross-domain


    【解决方案1】:

    您可以使用.contents() 和.find() 来查找要隐藏的特定元素,例如.mydivclass,在iframe 中使用该类。

    在你的 JS 中

    <script type="text/javascript">
    
    $(document).ready(function(){
       $("iframe").contents().find(".mydivclass").hide();
    });
    
    </script>
    

    【讨论】:

    • 我已经隐藏了它,但是在按 Tab 键或向下箭头键时,它又被显示了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-21
    • 2017-02-06
    • 1970-01-01
    • 2022-01-09
    • 2014-03-23
    相关资源
    最近更新 更多