What is preferred event.preventDefault() over return false to stop event propagation in JavaScript?

I came to know that both event.preventDefault() and return false can be used to stop event propagation in JavaScript. Is there any difference in technical or security aspects? Please explain.


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!


In this Discussion