There is no such thing as a stupid question, so here we go: What is the difference between between <input type='button' />
and <input type='submit' />
?
views:
6846answers:
3<input type="button" />
buttons will not submit a form - they don't do anything by default. They're generally used in conjunction with JavaScript as part of an AJAX application.
<input type="submit">
buttons will submit the form they are in when the user clicks on them, unless you specifiy otherwise with JavaScript.
A 'button' is just that, a button, to which you can add additional functionality using Javascript. A 'submit' input type has the default functionality of submitting the form it's placed in (though, of course, you can still add additional functionality using Javascript).
The question here is maybe more relevant if you asked, "what is the difference between a submit-button and a <button>label</button>
", since a <button>
also submits the form by default.