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

Howdy, Stranger!

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

Categories

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

danielm77danielm77 USAPosts: 72Member

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.

Tagged:

Comments

Sign In or Register to comment.