本文介绍了如何使用window.showModalDialog禁用浏览器关闭(X)按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在打开我的ModalDialog框时禁用窗口浏览器的close(X),它很小,并且包含确定"和关闭"按钮.

当用户单击关闭"按钮时,子页面应关闭.当他们单击浏览器关闭按钮时,它不应关闭.

Hi,

I want to disable the window browser close(X) while I am opening my ModalDialog box, which is small in size and contains buttons for OK and Close.

When the user clicks the ''Close'' button the child page should be closed. It should not get closed while they are clicking browser close button.

<script language="javascript" type="text/javascript">

        function Onclick()
        {


        RetVal = window.showModalDialog("CabinMappingChild.aspx","CabinMapping","dialogHeight: 190px; dialogWidth: 550px; titlebar: no; toolbar: no; statusbar:no");
        }
 </script>



我正在使用上面的代码,但仍然无法正常工作.




I am using the above code but still I could not get it to work.


Can anyone please help me?

推荐答案




这篇关于如何使用window.showModalDialog禁用浏览器关闭(X)按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 12:56
查看更多