Module button

Module button 

Source
Expand description

Attribute names for button (<button>) elements.

§Purpose

The <button> element represents a clickable button that can submit forms, reset forms, or trigger custom JavaScript actions.

§Common Attributes

  • type: Button behavior (submit, reset, button)
  • name: Form control name for submission
  • value: Value submitted with form
  • disabled: Disables the button
  • form: Associates button with a form by ID

§Example

<button type="submit" name="action" value="save">Save</button>
<button type="reset">Reset Form</button>
<button type="button" onclick="handleClick()">Click Me</button>
<button type="submit" formaction="/alt" formmethod="post">Alternative Submit</button>

§WHATWG Specification

Constants§

AUTOFOCUS
The autofocus attribute.
DISABLED
The disabled attribute.
FORM
The form attribute.
FORMACTION
The formaction attribute.
FORMENCTYPE
The formenctype attribute.
FORMMETHOD
The formmethod attribute.
FORMNOVALIDATE
The formnovalidate attribute.
FORMTARGET
The formtarget attribute.
NAME
The name attribute.
TYPE
The type attribute.
VALUE
The value attribute.