Difference between <input type='button' /> and <input type='submit' />

bounav picture bounav · Nov 14, 2008 · Viewed 204.6k times · Source

What is the difference between HTML <input type='button' /> and <input type='submit' />?

Answer

user7094 picture user7094 · Nov 14, 2008

<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 specify otherwise with JavaScript.