Closed quis closed 6 years ago
Both <button type='submit'>Submit<button> and <input type='submit' value='Submit'> can be used to submit a form.
<button type='submit'>Submit<button>
<input type='submit' value='Submit'>
Historically <input> has been preferred because it’s better-supported by IE6 in that:
<input>
submit
<button>
innerHTML
value
Reasons to now use <button> instead:
Fixes #545
Both
<button type='submit'>Submit<button>
and<input type='submit' value='Submit'>
can be used to submit a form.Historically
<input>
has been preferred because it’s better-supported by IE6 in that:submit
attribute is mandatory on<button>
, not on<input>
innerHTML
of a button will be submitted to the server, not thevalue
(as in other browsers)Reasons to now use
<button>
instead:<input>
element can’t have children, the pseudo-element hack1 used to ensure the top edge of the button is clickable doesn’t work.Fixes #545