How submit button works without `type="submit"`

Viewed 2001
1 Answers

If a button is inside a form, then by default it is given the submit type, unless you give it another type.

So the Reset button in that codesandbox has type="button" to prevent it triggering the event, but the Submit button leaves it blank, so it submits by default.

Reference: Moz Docs

Related