Consider this snippet.
<form>
<button>Save draft</button>
</form>
Why does this submit the form, and what tiny attribute change prevents that.
BayMax
Consider this snippet.
<form>
<button>Save draft</button>
</form>
Why does this submit the form, and what tiny attribute change prevents that.
BayMax
<button> defaults to type="submit" inside a form, so make it <button type="button">Save draft</button>.
Quelly
:: Copyright KIRUPA 2024 //--