MDN self-hosted library · e01.org

HTMLButtonElement: type property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<button id="button" type="reset">type</button>
js
const buttonElement = document.querySelector("#button");
console.log(buttonElement.type); // "reset"