How to capture ALT+F4 Key code

I would like to fire a confirm message to user when he is exiting from the application ie.by pressing ALT +f4
How can I do that ?
I tried to capture the key code using event.altKey but it's not working
Any Ideas!!

Comments

  • event.altKey is not firing in my system
  • : event.altKey is not firing in my system
    :

    Hi

    You can use the window.onunload event to fire the confirm
    message, but there are many people that doesnt like that
    and im one of them.

    Hope it helps.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories