faqts : Computers : Internet : Web : HTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

13 of 37 people (35%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

How to catch the "back button" event from/with HTML or JavaScript, so I can navigate the user to another page (not to the last in history)?

May 29th, 2001 12:24
Luciano Fernandes,


i don't think  browsers can capture the "back" event...
but onunload event captures any user's attempt to leave the current 
page. (including the back button)
eg.
...
<body onunload="alert('bye')">
...