In HTML the default type of button is not button

The default type of <button> is "submit" which is why a <button> in a <form> submits the form when clicked.

Simply doing <button type="button"> removes this behaviour without the need for JavaScript.


Popular posts from this blog

Turn a Web Page into a Desktop Application

En Dash with ComposeKey (Shift+AltGr)

Solution to Unity Desktop Fullscreen Graphical Glitch