The following refers to the implementation in JS, not <body onunload= "close ()" > This method!
Because this is the unload drop body when triggered, and bored any browser, will be closed when the body unload off!
Model 1:
function Close () {
Alert ("Sdfsdfsdf");
}
Window.onbeforeunload=close;
Model 2:
function Close () {
if (document.body.clientwidth-event.clientx< 170&&event.clienty< 0| | Event.altkey)
{
$ ("#logout1"). Submit ();
}
}
Window.onbeforeunload=close;
<form action= "/home/logout1" id= "LOGOUT1" ></form>
Jump directly to the LOGOUT1 controller for various operations
For model 1:
1). refresh, Multi-window and Single window are suitable.
2). Single Window IE turns off the entire IE trigger.
3). IE7 Close Single-page trigger in multiple windows
4) Other multi-window refresh triggers. Close the individual and close the whole without triggering
For Model 2:
1). IE Single window and IE7 multiple windows, all to close the entire browser to trigger
2). Other Multi-window browser refresh. Close a single page, close the whole without triggering
PS: The second method is recommended
Excerpted from http://www.cnblogs.com/zgqys1980/archive/2008/09/02/1281843.html