窗口拦截的问题
想弄一个窗口拦截提示,代码如下:var wp=window.open("chat5.htm","Rainbow","toolbar=no,titlebar=no,location=no,menubar=no,scrollbars=no,statusbar=no,width=650,height=500");
if(window.closed)
alert("窗口被拦截!");
else
{
}
可是怎么也不提示,请教
<script> var wp=window.open("chat5.htm","Rainbow","toolbar=no,titlebar=no,location=no,menubar=no,scrollbars=no,statusbar=no,width=650,height=500"); if(window.open) { alert("窗口被拦截!"); wp.close(); } else { alert("窗口没被拦截!"); } </script>