Data
<script language= "JavaScript" >
function ifwindowclosed ()
{
var win = null;
Try
{
Window.opener.name = "ss";
if (window.opener.name!= "SS")
{
Win = window.open ("quit.asp", "" "," width=100,height=100,left=10000,top=10000 ");
Window.settimeout ("Window.close ();", 0);
}
Window.opener.name = "";
}
catch (E)
{
Win = window.open ("quit.asp", "" "," width=100,height=100,left=10000,top=10000 ");
Window.settimeout ("Window.close ();", 0);
}
}
Window.setinterval ("ifwindowclosed ()", 100);
Window.settimeout ("Window.close ();", 510);
</SCRIPT>
---------------
Open the above file with the OnUnload event
Quit.asp for files that hold data, the file above is used to detect whether the window is closed or refreshed
IE5 compatible, previously used window.opener.closed to determine that IE5 does not support closed properties.
The code above has been tested several times, and no problem has been detected.