This page has a form with a submit button. Type something and click submit.
As you see, clicking the submit button will not submit the form. This is because the <form> tag has an "onsubmit" attribute with some Javascript to run when a user submits the form.
<form action="http://nytimes.com" method="POST" onsubmit="return doSomething();">That Javascript tells the browser to call the function called "doSomething". That function returns false, which overrides the default submit behavior of the form, and prevents the form from submitting.
function doSomething() {
//do something
return false;
}
If that function had returned true instead of false, then the submission would have gone ahead as usual.