Possible Duplicate:
JavaScript: event.preventDefault() vs return false
What are the cases when return false
does not do the same thing as e.preventDefault()
?
(Note I'm not talking about jQuery events.. but JavaScript events in general)
The only situation I can think of is a click
event on a hyperlink (if you return false in the handler you will still be redirected to the website)
Note that if its not a click
event but a mousedown
event on the hyperlink return false works same as e.preventDefault()
.