Don’t forget that the Button element in HTML has a default action that is “submit”.
I did. And it took me ages to work out why my page kept submitting until I realised I had to set the “type” attribute to “button”.
Comments are closed.