What is the difference between HTML <input type='button' /> and <input type='submit' />?
What is the difference between HTML <input type=’button’ /> and <input type=’submit’ /> ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
<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.The first submit button of the form is also the one being clicked for implicit submission, f.e. by pressing enter in a text input.