【问题标题】:How to display a button when there's a click inside of an iframe如何在 iframe 内单击时显示按钮
【发布时间】:2017-02-21 09:16:35
【问题描述】:

我有一个 iframe,其中包含一个表单字段和一个 iframe 内的提交按钮。 当我点击 iframe 内的提交按钮时,如何在 iframe 下方显示一个按钮?

【问题讨论】:

    标签: button iframe display


    【解决方案1】:

    如果我理解你的话,你想显示一个不在 iframe 内的按钮,对吧?

    在这种情况下试试这个:

    $(function(){
        var f=$('#foo')
        f.load(function(){ 
            f.contents().find("#element").on('click', function(event) { 
                newfunction();
            });
        })
    })
    function newfunction() {
        $("#button").show();
    }
    

    #element 是 iframe 内的提交按钮。

    #button 是您要在 iframe 下方显示的按钮。只需将 ID 更改为您自己的 ID。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-19
      • 2017-05-10
      • 1970-01-01
      • 1970-01-01
      • 2017-10-07
      • 2017-11-21
      • 2014-12-25
      • 1970-01-01
      相关资源
      最近更新 更多