I\'ve looked all over the web including several stack overflow examples for a solution to the question. To be specific, I tried this:
Because of historical reasons single (or ) inside submits form if type is not 'submit'.
According to MDN, button can may have type attribute.
Your button
makes button have no default behavior.
Here is more detailed answer.