我在许多页面上动态创建 iFrame。iFrame 包含一个对话框,用户可以在其中输入一些信息。这是在单独的网络服务器上,因为多个网站需要使用相同的对话框。当用户完成输入数据时,它通过将 div 的显示更改为无来隐藏对话框。唯一的问题是 iFrame 还在,它是透明的,但是 iFrame 下的任何内容都无法点击。无论如何,当 iFrame 内的对话框执行指定的操作时,它会将 iFrame 更改为在 iFrame 所在的页面上显示为无?
var PageOutput = "<iframe id=\"FiFrame\" src=\"myPage-1.html\" style=\"display: none; border: none; overflow: hidden; height: 500px; width: 300px; position:absolute; left: 0; top: 0;\"></iframe>";
var Icon = "<a href=\"#\" id=\"FLink\"><img src=\"images/feedback_button.png\" alt=\"\" style=\"position: fixed; right: 40%; top: 20%;\"/></a>";
$(document).ready(function() {
$(PageOutput).appendTo( document.body );
$(Icon).appendTo( document.body );
$('#FLink').click(function() {
$('#FiFrame').fadeIn(1000);
});
});