iframe弹出窗口没有关闭按下逃生 [英] iframe popup not closed on press escape
本文介绍了iframe弹出窗口没有关闭按下逃生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在一个页面中有一个8个iframe弹出窗口,并使用此代码关闭iframe forcefull
但它的工作只在1或2个弹出窗口中,而其他不在关闭的转义键上
i have a 8 iframe popups in one page and use this code to close iframe forcefull
but its work only in 1 or 2 popup and other not close on escape key
$("#VendorframeID").ready(function () {
setTimeout(function () {
$('#VendorframeID').contents().find('body').keyup(function (e) {
if (e.keyCode == 27) {
$("#ShowVendor").modal("hide");
}
});
}, 150);
});
i use iframe id和它的
i use iframe id and its
标签id for close iframe in all frame popup lke上面的例子
给我一个支持
给我一个支持
tag id for close iframe in all frame popup lke above example
give me a soution
give me a soution
推荐答案
( #VendorframeID)。ready(function(){
setTimeout(function( ){
("#VendorframeID").ready(function () { setTimeout(function () {
(' #VendorframeID')。contents( ).find(' body')。keyup(function(e){
if (e.keyCode == 27 ){
('#VendorframeID').contents().find('body').keyup(function (e) { if (e.keyCode == 27) {
( #ShowVendor)。modal( < span class =code-string> hide);
}
});
}, 150 );
});
("#ShowVendor").modal("hide"); } }); }, 150); });
i使用iframe id及其
i use iframe id and its
标签ID,用于关闭所有框架中的iframe弹出lke上面的示例
给我一个支持
给我一个支持
tag id for close iframe in all frame popup lke above example
give me a soution
give me a soution
这篇关于iframe弹出窗口没有关闭按下逃生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文