Supported Input Values
Supported values for the input
element are described here.
Input Type Values
Safari supports many different input types. They can be specified using the type
attribute of the input
element. These input types are listed below.
button
A button input type. More versatile than a submit button.
checkbox
A standard checkbox.
color
An input control for specifying a RGB color value. The user can select a color from a color well.
date
An input control for specifying a date value. The user can select a month, day of the month, and year. Unlike datetime
, date
does not offer the time of day.
Available for iOS 5.0 and later.
- Availability
datetime
An input control for specifying a date and time value. The user can select a month, day of the month, year, and time of day.
Available for iOS 5.0 and later.
- Availability
datetime-local
An input control for specifying a date and time value where the format depends on the locale.
Available for iOS 5.0 and later.
- Availability
A text field for specifying an email address. Brings up a keyboard optimized for email address entry for iOS.
Available for iOS.
- Availability
file
A file upload interface.
hidden
A hidden input type (to store values without showing them on the page). Note that the input can still be seen in the page source.
image
An image that acts as an input.
month
An input control for selecting a month.
Available for iOS 5.0 and later.
- Availability
number
A text field for specifying a number. Brings up a number pad keyboard for iOS. Specifying an input pattern of \d*
or [0-9]*
is equivalent to using this type.
Available for iOS.
- Availability
password
A visually shielded password field.
radio
A radio button.
range
A slider. Its minimum value should be set with the min
attribute, its maximum value should be set with max
, and its discrete step size should be set with step
.
Apple extension.
- Support Level
reset
A reset button for a form.
search
A search field. Uses the onsearch
, incremental
, placeholder
, autosave
, and results
attributes in addition to standard HTML attributes.
submit
A submission button for a form.
tel
A text field for specifying a phone number. Brings up a phone pad keyboard for iOS.
Available for iOS.
- Availability
text
A standard text field.
time
An input control for specifying a time value. The user can select the hour, minute, and optionally AM or PM.
Available for iOS 5.0 and later.
- Availability
url
A text field for specifying a URL. Brings up a keyboard optimized for URL entry for iOS.
Available for iOS.
- Availability
Copyright © 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-07-15