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!" ); }