The name
content attribute gives the
name of the form control, as used in form submission and in the
form
element's elements
object. If the attribute is specified, its value must not be the
empty string.
Any non-empty value for name
is allowed, but the names "_charset_
" and "isindex
" are special:
isindex
This value, if used as the name of a Text
control that is the first control in a form that is submitted using
the application/x-www-form-urlencoded
mechanism, causes the submission to only include the value of this
control, with no name.
_charset_
This value, if used as the name of a value
attribute, is automatically given a
value during submission consisting of the submission character
encoding.
The disabled
content attribute is
a boolean attribute.
A form control is disabled if its disabled
attribute is set, or if it is
a descendant of a fieldset
element whose disabled
attribute is set and is
not a descendant of that fieldset
element's first legend
element child, if any.
The autofocus
content attribute
allows the author to indicate that a control is to be focused as
soon as the page is loaded or as soon as the dialog
within which it finds itself is
shown, allowing the user to just start typing without having to
manually focus the main control.
The autofocus
attribute is a boolean attribute.
An element's nearest ancestor
autofocus scoping root element is the element itself if the
element is a dialog
element, or else is the element's
nearest ancestor dialog
element, if any, or else is the
element's root element.
There must not be two elements with the same nearest
ancestor autofocus scoping root element that both have the
autofocus
attribute specified.
In the following snippet, the text control would be focused when the document was loaded.
<input maxlength="256" name="q" value="" autofocus> <input type="submit" value="Search">
A form
control maxlength
attribute, controlled
by a dirty value flag, declares a limit on the
number of characters a user can input.
If an element has its form control
maxlength
attribute specified, the
attribute's value must be a valid non-negative integer.
If the attribute is specified and applying the
rules for parsing non-negative integers to its value results in
a number, then that number is the element's maximum allowed value length.
If the attribute is omitted or parsing its value results in an
error, then there is no maximum allowed value
length.