Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 想在弹出模态时模糊整个jsp吗?模态在我的iframe中,驻留在我的jsp中_Javascript_Jquery_Jsp_Jquery Ui_Iframe - Fatal编程技术网

Javascript 想在弹出模态时模糊整个jsp吗?模态在我的iframe中,驻留在我的jsp中

Javascript 想在弹出模态时模糊整个jsp吗?模态在我的iframe中,驻留在我的jsp中,javascript,jquery,jsp,jquery-ui,iframe,Javascript,Jquery,Jsp,Jquery Ui,Iframe,我有一个“example.jsp” example.jsp: <html> <body> <iframe id="firstframe" src="abc.jsp"></iframe> </body> </html> abc.jsp: <html> <body> <div id="modal" src="list.jsp"></div>

我有一个“example.jsp”

example.jsp:

 <html>
     <body>
    <iframe id="firstframe" src="abc.jsp"></iframe>
    </body>
 </html>

abc.jsp:

 <html>
 <body>
 <div id="modal" src="list.jsp"></div>
 <input type="button" id="listBtn"/>
 <script>
   $("#listBtn").click(function() {
    $("#modal").dialog({
        autoOpen: false,
        modal: true,
        width: 500,
        height: 500,
        title:'test',
    });
    $("#modalLookup").dialog("open");
});

 });
   </script>
 </body>
 </html>

$(“#listbn”)。单击(函数(){
$(“#模态”)。对话框({
自动打开:错误,
莫代尔:是的,
宽度:500,
身高:500,
标题:"测试",,
});
$(“modalLookup”)。对话框(“打开”);
});
});

因此,当前当我单击iframe中的按钮时,模式窗口打开,我的abc.jsp变得模糊。但是我希望我的example.jsp也变得模糊。

欢迎使用堆栈溢出。我认为这是不可能的。由于您是从iFrame中执行JS,因此它有自己的DOM。模态正在到达iFrame中该文档的边界。我相信您需要该对话框驻留在父文档中。您需要从iFrame中捕获单击事件并触发对话框,这将很难做到。谢谢@Twisty。我们尝试了很多方法,但都没有成功。我尝试了一下运气,看看是否有什么解决办法。:-)