js achieve refresh browser to execute event

window.onload = your js method, remember not to use the method behind the brackets.

// This method is to capture the browser refresh event 
the window.onload = wOnload ();
 // this is the event to refresh the browser to execute the 
function wOnload () { 
    Alert ( "You're a refresh event!" ); 
}

 

Guess you like

Origin www.cnblogs.com/zhouheblog/p/11936687.html