In most cases, returning false for event handlers prevents default event behavior.
For example, by default, clicking on an <a> element will jump to the page specified by the href attribute of the element. Return False is equivalent to the terminator, and Return True is equivalent to the execution character. The effect of return false in js is generally used to cancel the default action. For example, if you click a link, in addition to triggering your onclick event (if you specify), you also have to trigger a default event, which is to perform a page jump. So if you want to cancel the default action of the object, you can return false.
Similarly, return false can be applied to form submission. For example, when verifying the form, we usually judge whether the information is true and whether the information is missed. If any of the above conditions meets the conditions, then we need to output prompt information on the client, and will not submit it to the server for processing. Return flase can show its skills here---!