别人的:
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body scroll=no leftmargin=0 topmargin=0 valign=top oncontextmenu="return false;">
<OBJECT id="min" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="Minimize"></OBJECT>
<script>
var openwinflag;
function freezwy()
{
openwinflag=window.open(top.location,'freezwy_tj','fullscreen=0,toolbar=no,scrollbars=no,resizable=1,menubar=no');
window.focus();
document.min.Click();
}
if(window.name != "freezwy_tj")
{
freezwy();
openwinflag.resizeTo(800,600);
openwinflag.moveTo(0,0);
}function closewin()
{
openwinflag.close();
self.close();
}
</script>
<input type="button" name="Submit" value="关闭" onclick="closewin()">
</body>
</html>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body scroll=no leftmargin=0 topmargin=0 valign=top oncontextmenu="return false;">
<OBJECT id="min" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="Minimize"></OBJECT>
<script>
var openwinflag;
function freezwy()
{
openwinflag=window.open(top.location,'freezwy_tj','fullscreen=0,toolbar=no,scrollbars=no,resizable=1,menubar=no');
window.focus();
document.min.Click();
}
if(window.name != "freezwy_tj")
{
freezwy();
openwinflag.resizeTo(800,600);
openwinflag.moveTo(0,0);
}function closewin()
{
openwinflag.close();
self.close();
}
</script>
<input type="button" name="Submit" value="关闭" onclick="closewin()">
</body>
</html>
<SCRIPT LANGUAGE=javascript>
<!--
function closeWindow()
{
if (typeof(window.parent)!='object')
window.close();
setTimeout("closeWindow()",100);
}
closeWindow();//-->
</SCRIPT>
alert("已关闭")
else
alert("还没关")
function window.onbeforeunload(){
with(event){
if(clientX>document.body.clientWidth &&clientY<0||altKey)
alert("Are u sure to close?")
else
alert("Are u sure to refresh?")
}
}
</script>