检查窗口的关闭打开 - 中国WEB开发者网络 (http://www.webasp.net) -- 网页特效 (http://www.webasp.net/javascript/) --- 检查窗口的关闭打开 (http://www.webasp.net/javascript/1/723.htm) |
| -- 发布日期: 2005-07-01 |
| <!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! --> <!-- 要实现此效果需要 1 个步骤: --> <!-- 第 1 步: --> <!-- 把下面的代码加到<BODY></BODY>区域中: --> <script> var newwin function makenewwin() { newwin=window.open("","vv","height=300,width=200") newwin.document.writeln("ok") newwin.document.close() } function check() { if (newwin&&newwin.open&&!newwin.closed){ alert("开的") } else{ alert("关的") } } </script> <input type="button" value="open" onclick="makenewwin()"> <input type="button" value="检查" onclick="check()"> |
| webasp.net |