[查看演示] 源码如下 ---------------------------------------------------------- <HTML>
<HEAD>
<TITLE>opener状态-www.51windows.Net</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Author" CONTENT="51windows,海娃,haiwa">
<META NAME="Description" CONTENT="Power by 51windows.Net">
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (window.opener){document.write("<button onclick='checkwin();'>检测</button>")}
else{document.write("<button onclick='window.open(\"#\",\"newwin\",\"\");'>打开</button>")}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkwin()
{
var wo = window.opener
if (wo.closed)
{
alert("已关闭")
}
else
{
alert("没有关闭")
if (wo.screenTop == 0){alert("全屏")}
else if (wo.screenTop <-1000){alert("最小化")}
}
}
//-->
</SCRIPT>
</BODY>
</HTML>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div> |