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
Inside a form, <button> defaults to type="submit", so use <button type="button">Save draft</button> if it should not submit.
Sarah
:: Copyright KIRUPA 2024 //--