开发者

Determine if window was opened by window.showModalDialog?

开发者 https://www.devze.com 2023-01-26 12:03 出处:网络
Does anyone know how to figure out if a window was opened by window.showModalDialog()?window.opener returns the parent window when the new window is opened by window.open(), but for some reason when y

Does anyone know how to figure out if a window was opened by window.showModalDialog()? window.opener returns the parent window when the new window is opened by window.open(), but for some reason when you use window.showModalDialog(), windo开发者_JAVA百科w.opener returns as undefined. jQuery solutions are also welcome.


You can check if window.dialogArguments is defined:

function isModalWindow()
{
    return (window.dialogArguments != null);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号