Open the javascript console, put your cursor in the text box, and press enter. Why is the function "baz" called? How should it be suppressed?
function foo() {
console.log('foo');
}
function bar() {
console.log('bar');
}
function baz() {
console.log('baz');
}
function blee() {
console.log('blee');
}
<form onsubmit="foo()" action="javascript:blee()">
<input type="text" />
<button onclick="baz()">baz</button>
<button onclick="bar()">bar</button>
<input type="submit" />
</form>