Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
140
rated 0 times [  147] [ 7]  / answers: 1 / hits: 23949  / 14 Years ago, wed, january 12, 2011, 12:00:00

What is the standard behavior for when a <button> element is clicked in a form? Will it submit the form?


Question is about tag/element <button>, not <input type=button>.


More From » html

 Answers
17

If the button is within a form, the default behavior is submit.



If the button is not within a form, it will do nothing.



BUT BE AWARE!




Always specify the type attribute for
the button. The default type for
Internet Explorer is button, while
in other browsers (and in the W3C
specification) it is submit.




Taken from http://www.w3schools.com/tags/tag_button.asp


[#94258] Tuesday, January 11, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tylerdamiena

Total Points: 139
Total Questions: 90
Total Answers: 118

Location: Liechtenstein
Member since Wed, Dec 8, 2021
3 Years ago
tylerdamiena questions
;