Skip to content

Comment on The Difference Between a Button and a Linkparent

Comments

I guess the distinction would be that in the formaction/formmethod case you'll also submit all the other form data, while the button action will just be an empty body.

An extra blank form on the page and the form attribute on the button can work around that, and at that point the argument would basically be: this is super clunky.

But there is no semantically valid reason for the button to be in the form if it doesn't submit the form. So move it outside.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.