News for hackers. Stuff that matters.
Re:Just Use a Button by mixmastamyk on Friday October 31, 2025 @03:20PM (#45775683)
Believe that default is for <input type="submit">, not <button>.
Re:Just Use a Button by cferdinandi on Friday October 31, 2025 @03:43PM (#45775922)
It's the default for buttons inside forms, but it's SO trivial to add type="button" than any argument that div's are a better choice because of this should be dismissed as unserious trolling out-of-hand.
Re:Just Use a Button by pverheggen on Friday October 31, 2025 @03:25PM (#45775737)
Nope, it's the default:

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

Maybe you’re thinking of <input type=“button”>, which doesn’t submit?

Re:Just Use a Button by tomkarho on Friday October 31, 2025 @05:18PM (#45776810)
I seem to recall that once upon a time the default type for a button was in fact "button" but at some point (somewhere in the region of html 5 / es6) it was switched into "submit".
Re:Just Use a Button by pwdisswordfishy on Saturday November 01, 2025 @08:06AM (#45781018)
The nice thing about actually versioning standards (instead of doing that lazy "living standard" shit) is that you can actually look such things up.

https://www.w3.org/TR/html4/interact/forms.html#adef-type-BU...