What is difference between return false;
and e.preventDefault();
?
Asked
Active
Viewed 371 times
2

Marcel Gwerder
- 8,353
- 5
- 35
- 60

SGh
- 137
- 1
- 2
- 9
1 Answers
0
e.preventDefault()
will prevent the default event from occuring and return false
stops propogation.

Rahul Tripathi
- 168,305
- 31
- 280
- 331
-
Wrong. `e.preventDefault()` prevents the default action (not event) from occurring, without stopping further propagation of the event. And on some browsers in some circumstances, `return false` does the same, but there isn't any W3C specification for this. – Oriol Sep 24 '13 at 01:32