An element that can be turned on and off. This is most commonly rendered as a box when the element is off and a box with a check when the element is on. The user can switch the state of the check box by selecting it with the mouse. A label, specified with the label
attribute, may be added beside the check box.
More information is available in the XUL tutorial.
<checkbox label="Enable JavaScript" checked="true"/> <checkbox label="Enable Java" checked="false"/>
accesskey
label
attribute for the element.
checked
hasAttribute()
to determine whether this attribute is set instead of getAttribute()
.type
attribute must be set to checkbox
or radio
for this attribute to have any effect.crop
crop
attribute. An ellipsis will be used in place of the cropped text. If the box direction is reversed, the cropping is reversed.start
end
left
right
center
none
none
and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the value none
:menupopup > menuitem, menupopup > menu { max-width: none; }
disabled
command
event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true
, as this will suggest you can set it to false
to enable the element again, which is not the case.
disabled
attribute is allowed only for form controls. Using it with an anchor tag (an <a>
link) will have no effect.disabled
property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.src
preference
preference
. This attribute only has any effect when used inside a prefwindow
. More information is available in the Preferences System article.tabindex
tab
" key. Elements with a higher tabindex
are later in the tab sequence.accessibleType
nsIAccessibleProvider
, nsIDOMXULCheckboxElement