簡體   English   中英

如何在iframe中以Ajax成功打開引導模型

[英]How to open bootstrap model on ajax success in an iframe

我想在iframe中成功啟用Ajax功能時打開引導程序模型。

我試過使用:

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

兩者都無法在iframe中使用。 如果沒有那么值得問的話,請原諒。 我可以使用

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

但是我需要編寫close()函數。 我想從引導程序方面解決。 如果沒有,我會使用JQuery。 提前致謝。

如您所知, jquery庫函數僅可用於框架內的頁面,因此您可以使用parent.hide()函數將其關閉,

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

從您的iframe

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM