Game Development Reference
In-Depth Information
•
readonly
(acceptable values include
readonly
,
""
, or empty): Speci-
fies that the value of this element cannot be changed by the user.
•
placeholder
(value must be a string): Specifies a string to be shown to
the user as a hint as to what information the field expects. This string dis-
appears when data is entered into the field and is shown when the field
becomes empty.
•
step
(acceptable values include
any
or any positive integer): Specifies
how the value attribute of the element is to change.
•
required
(acceptable values include
required
,
""
, or empty): Speci-
fies that this element must have a valid value in order for the form to be
allowed to submit.
•
value
(value must be a floating point number): Specifies the actual float-
ing point number represented by this element.
Range
The range input type allows the user to select a number from a specified range using
a browser-supplied slider widget. The specific format and styling of this slider widget
is unique to the browser and platform used. The data that results from a range se-
lection is a floating point number.
<input type="range"
min="42"
max="108"
step="0.5"
/>
Other valid attributes for the date input type include the following:
•
name
(value must be a string): Identifies a particular field by the string
value associated with the attribute.
•
disabled
(acceptable values include
disabled
,
""
, or empty): Speci-
fies that the element is disabled and cannot receive control.
•
autocomplete
(acceptable values include
on
or
off
): Specifies wheth-
er the browser should store values entered by the user so inputting a
stored value in the future can be automatically completed by the browser
upon hint by user.