Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Believe that default is for <input type="submit">, not <button>.


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.


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?


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".


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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: