Name
Button — an HTML <button>
Inherits from
Node, Element, FormControl
Synopsis
A Button object represents an HTML <button>
element. Most of the
properties and methods of Buttons are described in FormControl and Element.
When a Button has a type
property
(see FormControl) “submit”, however, the
other properties listed here specify form submission parameters that
override similar properties on the Button’s form
(see FormControl).
Properties
The following properties are meaningful only when the <button>
has a type
of “submit”.
string
formAction
This property mirrors the
formaction
HTML attribute. For submit buttons, it overrides theaction
property of the form.string
formEnctype
This property mirrors the
formenctype
HTML attribute. For submit buttons, it overrides theenctype
property of the form and has the same legal values as that property.string
formMethod
This property mirrors the
formmethod
HTML attribute. For submit buttons, it overrides themethod
property of the form.string
formNoValidate
This property mirrors the
formnovalidate
HTML attribute. For submit buttons, it overrides thenoValidate
property of the form.string
formTarget
This property mirrors the
formtarget
HTML attribute. For submit buttons, it overrides thetarget
property of the form.
Get JavaScript: The Definitive Guide, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.