A button that can be pressed by the user. Event handlers can be used to trap mouse, keyboard and other events. It is typically rendered as a grey outset rectangle.
Example:
<button value="Press Me"
onclick="alert('You pressed me!'); return false;"/>
Attributes:
Attributes inherited from XUL Element
This should be set to a letter that is used as a shortcut key. This letter should be one of the characters that appears in the label text for the button. This letter will typically be drawn underlined, although this behavior will be platform and skin specific. When the user presses ALT (or a similar key that varies on each platform) and the access key, the button will be activated from anywhere in the window.
If the label of the button is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be placed in place of the cropped text.
This attribue can be set to either true or false. If true, then this element becomes the default for the window. Usually, this would be set to true for the OK button and set to false, or left out entirely, for all other buttons. Only one button per window should have the default value set to true.
If this attribute is set to true, the button is disabled. This is usually drawn with the text in grey. If the button is disabled, the function of the button cannot be performed. The value may also be set to false for a regular active button. If this attribute is left out entirely, the button is enabled.
Indicates the flexibility of the button. Flexible elements grow and shrink to fit their given space. The actual value is not relevant unless there are other flexible elements with-in the same container. Elements with larger flex values will grow more than elements with lower flex values, at the ratio determined by the two elements.
The height of the button in pixels. It is recommended to use the CSS height property instead.
For elements placed within a bulletinboard, specifies the position of the left edge of the button.
Used to specify whether the children of the element are oriented horizontally or vertically. For buttons, this specifies whether the image appears to the left or above the label.
The URL of the image to appear on the button. If this is attribute is left out, no image appears.
For elements placed within a bulletinboard, specifies the position of the top edge of the button.
The label that will appear on the button. If this is left out, no text appears.
The width of the button in pixels. It is recommended to use the CSS width property instead.
JavaScript Properties and Methods:
Properties and Methods inherited from XUL Element
Gets and sets the value of the accesskey attribute.
Gets and sets the value of the crop attribute.
Gets and sets the value of the disabled attribute.
Gets and sets the value of the imgalign attribute.
Gets and sets the value of the src attribute.
Gets and sets the value of the value attribute.