HtmlButtonElement Class
https://html.spec.whatwg.org/multipage/form-elements.html#htmlbuttonelement
public sealed class HtmlButtonElement : HtmlElement- Inheritance
HtmlElementHtmlButtonElement
Properties
| Name | Description |
|---|---|
| Command | Gets or sets the value of the command content attribute. |
| CommandForElement | Gets or sets the element whose ID is the value of the commandfor content attribute. |
| Disabled | Gets or sets a value indicating whether the element has the disabled content attribute. |
| Form | Gets the form owner of the element, or null when it has none. |
| FormAction | Gets or sets the value of the formaction content attribute. |
| FormEnctype | Gets or sets the value of the formenctype content attribute, limited to the known values (the canonical keyword, or the default value). |
| FormMethod | Gets or sets the value of the formmethod content attribute, limited to the known values (the canonical keyword, or the default value). |
| FormNoValidate | Gets or sets a value indicating whether the element has the formnovalidate content attribute. |
| FormTarget | Gets or sets the value of the formtarget content attribute. |
| Labels | Gets the label elements associated with the element. |
| Name | Gets or sets the value of the name content attribute. |
| PopoverTargetAction | Gets or sets the value of the popovertargetaction content attribute, limited to the known values (the canonical keyword, or the default value). |
| PopoverTargetElement | Gets or sets the element whose ID is the value of the popovertarget content attribute. |
| Type | Gets or sets the value of the type content attribute. |
| ValidationMessage | Gets the error message that would be shown to the user if the element is invalid, or an empty string. |
| Validity | Gets the ValidityState object that describes the validity of the element. |
| Value | Gets or sets the value of the value content attribute. |
| WillValidate | Gets a value indicating whether the element is a candidate for constraint validation. |
Command
HtmlElements.g.csGets or sets the value of the command content attribute.
public string Command { get; set; }Property value
See also
CommandForElement
HtmlElements.g.csGets or sets the element whose ID is the value of the commandfor content attribute.
public Element? CommandForElement { get; set; }Disabled
HtmlElements.g.csGets or sets a value indicating whether the element has the disabled content attribute.
public bool Disabled { get; set; }Property value
See also
Gets the form owner of the element, or null when it has none.
public HtmlFormElement? Form { get; }FormAction
HtmlElements.g.csGets or sets the value of the formaction content attribute.
public string FormAction { get; set; }FormEnctype
HtmlElements.g.csGets or sets the value of the formenctype content attribute, limited to the known values (the canonical keyword, or the default value).
public string FormEnctype { get; set; }FormMethod
HtmlElements.g.csGets or sets the value of the formmethod content attribute, limited to the known values (the canonical keyword, or the default value).
public string FormMethod { get; set; }FormNoValidate
HtmlElements.g.csGets or sets a value indicating whether the element has the formnovalidate content attribute.
public bool FormNoValidate { get; set; }Property value
See also
FormTarget
HtmlElements.g.csGets or sets the value of the formtarget content attribute.
public string FormTarget { get; set; }Property value
See also
Labels
FormControlMembers.csGets the label elements associated with the element.
public NodeList Labels { get; }Gets or sets the value of the name content attribute.
public string Name { get; set; }Property value
See also
PopoverTargetAction
HtmlElements.g.csGets or sets the value of the popovertargetaction content attribute, limited to the known values (the canonical keyword, or the default value).
public string PopoverTargetAction { get; set; }Property value
See also
PopoverTargetElement
HtmlElements.g.csGets or sets the element whose ID is the value of the popovertarget content attribute.
public Element? PopoverTargetElement { get; set; }Property value
See also
Gets or sets the value of the type content attribute.
public string Type { get; set; }Property value
See also
ValidationMessage
FormControlMembers.csGets the error message that would be shown to the user if the element is invalid, or an empty string.
public string ValidationMessage { get; }Validity
FormControlMembers.csGets the ValidityState object that describes the validity of the element.
public ValidityState Validity { get; }Value
HtmlElements.g.csGets or sets the value of the value content attribute.
public string Value { get; set; }Property value
See also
WillValidate
FormControlMembers.csGets a value indicating whether the element is a candidate for constraint validation.
public bool WillValidate { get; }Methods
| Name | Description |
|---|---|
| CheckValidity() | Returns whether the element satisfies its constraints, firing an invalid event when it does not. |
| ReportValidity() | Checks whether the element satisfies its constraints, firing an invalid event when it does not. |
| SetCustomValidity(string) | Sets the custom validity error message of the element; an empty string clears the custom error. |
CheckValidity()
FormControlMembers.csReturns whether the element satisfies its constraints, firing an invalid event when it does not.
public bool CheckValidity()ReportValidity()
FormControlMembers.csChecks whether the element satisfies its constraints, firing an invalid event when it does not.
public bool ReportValidity()SetCustomValidity(string)
FormControlMembers.csSets the custom validity error message of the element; an empty string clears the custom error.