When and why to return false in JavaScript?
return false
Often, in event handlers, such as onsubmit, returning false is a way to tell the event to not actually fire. So, say, in the onsubmit case, this would mean that the form is not submitted.
onsubmit
1.4m articles
1.4m replys
5 comments
57.0k users