【问题标题】:How to open bootstrap model on ajax success in an iframe如何在 iframe 中打开 ajax 成功的引导模式
【发布时间】:2015-11-16 05:03:21
【问题描述】:

我想在 iframe 中打开 ajax 函数成功的引导模型。

我尝试过使用:

$('#mapDiv').modal('show');   
jQuery("#mapDiv").modal('show');

两者都不能在 iframe 中工作。 如果它不值得问,请原谅。 我可以使用

$('#mapDiv').show();

但我需要编写 close() 函数。我想要一个来自引导方面的解决方案。 如果没有,我会选择 JQuery。 提前致谢。

【问题讨论】:

    标签: javascript jquery ajax twitter-bootstrap iframe


    【解决方案1】:

    如您所知,jquery 库函数只能对框架内的页面进行访问,因此您可以使用 parent.hide() 函数将其关闭,

    parent.$('#mapDiv').modal('hide');
    

    来自您的iframe

    【讨论】:

      猜你喜欢
      • 2015-05-09
      • 1970-01-01
      • 1970-01-01
      • 2014-02-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-29
      • 1970-01-01
      相关资源
      最近更新 更多