문제

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(), window.opener returns as undefined. jQuery solutions are also welcome.

도움이 되었습니까?

해결책

You can check if window.dialogArguments is defined:

function isModalWindow()
{
    return (window.dialogArguments != null);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top