Baseline Widely available
The type
property of the HTMLButtonElement
interface is a string that indicates the behavior type of the <button>
element.
It reflects the type
attribute of the <button>
element.
A string representing the type.
Its possible values are listed in the attribute's button types section.
Example HTML<button id="button" type="reset">type</button>
JavaScript
const buttonElement = document.querySelector("#button");
console.log(buttonElement.type); // "reset"
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4