Difference between type submit and button of <button> tag in HTML?
I have a login form with two text boxes and a button. I see the type of <button> tag has two options is submit and button. What is the difference between them?
<button type="submit" id="submitForm" >Login</button>
<button type="button" id="submitForm" >Login</button>
Sandeep Kumar Jul 24 2020
type="submit": Help submit a form, it use to working with a <form> tag. This is the default feature.
type="button": You can not submit a form, it's helpful in some case manipulation with <input> tags but doesn't want to submit or reload the page.