identifiying close, refresh,back click in browser

Discussion in 'JavaScript' started by shiva_rnm, Aug 22, 2010.

  1. #1
    Hi all

    I have the below set of code

    $(window).unload( function() {
    test();
    });
    the test() will call when i close the window and also if i refresh the window ..... How can identify is it a refresh or close event . I need to call test() only at close event. Please help me...
     
    shiva_rnm, Aug 22, 2010 IP