Baseline Widely available *
ÐпиÑаниеÐÐ»ÐµÐ¼ÐµÐ½Ñ HTML <input>
иÑполÑзÑеÑÑÑ Ð´Ð»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð¸Ð½ÑеÑакÑивнÑÑ
ÑлеменÑов ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð² веб-ÑоÑмаÑ
Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½ÑÑ
Ð¾Ñ Ð¿Ð¾Ð»ÑзоваÑелÑ; в завиÑимоÑÑи Ð¾Ñ ÑÑÑÑойÑÑва и user agent, доÑÑÑпен ÑиÑокий вÑÐ±Ð¾Ñ Ñипов вÑ
однÑÑ
даннÑÑ
и виджеÑов ÑпÑавлениÑ. Ðз-за огÑомного колиÑеÑÑва возможнÑÑ
ÑоÑеÑаний Ñипов ввода и аÑÑибÑÑов ÑÑо один из ÑамÑÑ
моÑнÑÑ
и ÑложнÑÑ
ÑлеменÑов HTML.
type
has not the hidden
value, labellable element, palpable content.HTMLInputElement
ÐÑÐ¾Ñ ÑÐ»ÐµÐ¼ÐµÐ½Ñ ÑодеÑÐ¶Ð¸Ñ Ð³Ð»Ð¾Ð±Ð°Ð»ÑнÑе аÑÑибÑÑÑ.
audio/*
Ð´Ð»Ñ Ð°ÑдиоÑайловvideo/*
Ð´Ð»Ñ Ð²Ð¸Ð´ÐµÐ¾Ñайловimage/*
Ð´Ð»Ñ Ñайлов Ñ Ð¸Ð·Ð¾Ð±ÑажениÑмиtype
Тип ÑлеменÑа Ð´Ð»Ñ Ð¾ÑобÑажениÑ. ÐÑли ÑÑÐ¾Ñ Ð°ÑÑибÑÑ Ð½Ðµ Ñказан, по ÑмолÑÐ°Ð½Ð¸Ñ Ð¸ÑполÑзÑеÑÑÑ text
. ÐозможнÑми знаÑениÑми ÑвлÑÑÑÑÑ:
button
: Ðнопка без пÑедопÑеделÑнного поведениÑ.
checkbox
: Флажок («ÑекбокÑ»). СледÑÐµÑ Ð¸ÑполÑзоваÑÑ Ð°ÑÑибÑÑ value Ð´Ð»Ñ Ð¾Ð¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð·Ð½Ð°ÑениÑ, коÑоÑое бÑÐ´ÐµÑ Ð¾Ñдано ÑÑим ÑлеменÑом. ÐÑполÑзÑйÑе аÑÑибÑÑ checked, ÑÑÐ¾Ð±Ñ ÑказаÑÑ, должен ли Ñлажок бÑÑÑ Ð²ÑÑÑавлен. Ðожно Ñакже иÑполÑзоваÑÑ Ð°ÑÑибÑÑ indeterminate, ÑÑÐ¾Ð±Ñ ÑказаÑÑ, ÑÑо Ñлажок наÑ
одиÑÑÑ Ð² неопÑеделÑнном ÑоÑÑоÑнии (на болÑÑинÑÑве плаÑÑоÑм пÑи ÑÑом ÑиÑÑеÑÑÑ Ð³Ð¾ÑизонÑалÑÐ½Ð°Ñ Ð»Ð¸Ð½Ð¸Ñ Ð¿Ð¾Ð¿ÐµÑÑк Ñлажка).
color
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ ÑвеÑом. ÐолÑзоваÑелÑÑкий инÑеÑÑÐµÐ¹Ñ Ð²ÑбоÑа ÑвеÑа не Ð¸Ð¼ÐµÐµÑ Ð½Ð¸ÐºÐ°ÐºÐ¸Ñ
дÑÑгиÑ
ÑÑнкÑий, кÑоме пÑинÑÑÐ¸Ñ Ð¿ÑоÑÑÑÑ
ÑвеÑов в виде ÑекÑÑа (болÑÑе инÑоÑмаÑии).
date
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° даÑÑ (год, меÑÑÑ Ð¸ денÑ, без вÑемени).
datetime
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° даÑÑ Ð¸ вÑемени (ÑаÑ, минÑÑа, ÑекÑнда и Ð´Ð¾Ð»Ñ ÑекÑндÑ) в ÑооÑвеÑÑÑвии Ñ ÑаÑовÑм поÑÑом UTC.
datetime-local
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° даÑÑ Ð¸ вÑемени без ÑаÑового поÑÑа.
email
: Ðоле Ð´Ð»Ñ ÑедакÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð°Ð´ÑеÑа ÑлекÑÑонной поÑÑÑ. ÐеÑед оÑпÑавкой пÑовеÑÑеÑÑÑ, ÑÑо вÑ
одное знаÑение ÑодеÑÐ¶Ð¸Ñ Ð»Ð¸Ð±Ð¾ пÑÑÑÑÑ ÑÑÑокÑ, либо один дейÑÑвиÑелÑнÑй адÑÐµÑ ÑлекÑÑонной поÑÑÑ. СооÑвеÑÑÑвÑÑÑ CSS пÑевдоклаÑÑам :valid
and :invalid
.
file
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑавлениÑ, коÑоÑÑй позволÑÐµÑ Ð¿Ð¾Ð»ÑзоваÑÐµÐ»Ñ Ð²ÑбÑаÑÑ Ñайл. ÐÑполÑзÑйÑе аÑÑибÑÑ accept, ÑÑÐ¾Ð±Ñ Ð¾Ð¿ÑеделиÑÑ ÑÐ¸Ð¿Ñ Ñайлов, коÑоÑÑе могÑÑ Ð±ÑÑÑ Ð²ÑбÑанÑ.
hidden
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑавлениÑ, коÑоÑÑе не оÑобÑажаеÑÑÑ, но ÑÑÑ Ð·Ð½Ð°Ñение оÑпÑавлено на ÑеÑвеÑ.
image
: Ðнопка вÑÑавки изобÑажениÑ. ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ Ð¸ÑполÑзоваÑÑ Ð°ÑÑибÑÑ src, ÑÑÐ¾Ð±Ñ Ð¾Ð¿ÑеделиÑÑ Ð¿ÑÑÑ Ðº изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð¸ аÑÑибÑÑ alt - Ð´Ð»Ñ Ð¾Ð¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð°Ð»ÑÑеÑнаÑивного ÑекÑÑа. ÐÑ Ð¼Ð¾Ð¶ÐµÑе иÑполÑзоваÑÑ Ð°ÑÑибÑÑÑ height и width, ÑÑÐ¾Ð±Ñ Ð¾Ð¿ÑеделиÑÑ ÑÐ°Ð·Ð¼ÐµÑ Ð²ÑÑавки изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð² пикÑелÑÑ
.
month
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° меÑÑÑа и года без ÑаÑового поÑÑа.
number
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²Ð²Ð¾Ð´Ð° ÑиÑла(Ñип float).
password
: ÐдноÑÑÑоÑное ÑекÑÑовое поле, ÑÑÑ Ð·Ð½Ð°Ñение ÑкÑÑÑо Ñимволом "звÑздоÑка". ÐÑполÑзÑйÑе аÑÑибÑÑÑ minlength и maxlength, ÑÑÐ¾Ð±Ñ ÑказаÑÑ Ð¼Ð¸Ð½Ð¸Ð¼Ð°Ð»ÑнÑÑ Ð¸ макÑималÑнÑÑ Ð´Ð»Ð¸Ð½Ñ Ð·Ð½Ð°ÑениÑ, коÑоÑое Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð²Ð²ÐµÐ´ÐµÐ½Ð¾.
ÐÑимеÑание: ÐÑбÑе ÑоÑмÑ, в коÑоÑÑÑ Ð¿ÑиÑÑÑÑÑвÑÐµÑ Ð²Ð°Ð¶Ð½Ð°Ñ Ð¸Ð½ÑоÑмаÑиÑ(напÑимеÑ, паÑолÑ), Ð´Ð¾Ð»Ð¶Ð½Ñ Ð±ÑÑÑ Ð¾Ð±ÑабоÑÐ°Ð½Ñ ÑеÑез HTTPS; в наÑÑоÑÑий Ð¼Ð¾Ð¼ÐµÐ½Ñ Firefox ÑеализÑÐµÑ ÑоÑÑавной Ð¼ÐµÑ Ð°Ð½Ð¸Ð·Ð¼ пÑедÑпÑеждениÑ, напÑавленнÑе пÑоÑив небезопаÑнÑÑ ÑоÑм Ð´Ð»Ñ Ð²Ñ Ð¾Ð´Ð° в ÑиÑÑÐµÐ¼Ñ - ÑмоÑÑиÑе ÐебезопаÑнÑе паÑоли.
radio
: Ðнопка-пеÑеклÑÑаÑелÑ, позволÑÐµÑ Ð²ÑбÑаÑÑ Ð¾Ð´Ð½Ð¾ знаÑение из множеÑÑвенного вÑбоÑа.
range
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° ÑиÑла, ÑоÑное знаÑение коÑоÑого не Ð¸Ð¼ÐµÐµÑ Ð·Ð½Ð°ÑениÑ. ÐÑÐ¾Ñ Ñип ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¸ÑполÑзÑÐµÑ ÑледÑÑÑие знаÑÐµÐ½Ð¸Ñ Ð¿Ð¾ ÑмолÑаниÑ, еÑли ÑооÑвеÑÑÑвÑÑÑие аÑÑибÑÑÑ Ð½Ðµ ÑказанÑ:
min
: 0max
: 100value
: min
+ (max
-min
)/2, or min
if max
is less than min
step
: 1reset
: Ðнопка ÑбÑоÑа ÑодеÑжимого ÑоÑÐ¼Ñ Ð² ÑоÑÑоÑние по ÑмолÑаниÑ.
search
: ÐдноÑÑÑоÑное ÑекÑÑовое поле Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° ÑÑÑок поиÑка; ÑазÑÑÐ²Ñ ÑÑÑок авÑомаÑиÑеÑки ÑдалÑÑÑÑÑ Ð¸Ð· вÑ
одного знаÑениÑ.
submit
: Ðнопка Ð´Ð»Ñ Ð¾ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ ÑоÑмÑ.
tel
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° номеÑа ÑелеÑона; ÑазÑÑÐ²Ñ ÑÑÑок авÑомаÑиÑеÑки ÑдалÑÑÑÑÑ Ð¸Ð· вÑ
одного знаÑениÑ, но никакой дÑÑгой ÑинÑакÑÐ¸Ñ Ð½Ðµ пÑименÑеÑÑÑ. Ðожно иÑполÑзоваÑÑ Ñакие аÑÑибÑÑÑ ÐºÐ°Ðº pattern и maxlength, ÑÑÐ¾Ð±Ñ Ð¾Ð³ÑаниÑиÑÑ Ð²Ð²Ð¾Ð´Ð¸Ð¼Ð¾Ðµ знаÑение. ÐÑевдоклаÑÑÑ CSS :valid
and :invalid
пÑименÑÑÑÑÑ Ð¿Ñи необÑ
одимоÑÑи..
text
: ÐдноÑÑÑоÑное ÑекÑÑовое поле. ÐеÑеноÑÑ ÑÑÑок авÑомаÑиÑеÑки ÑдалÑÑÑÑÑ Ð¸Ð· вÑ
одного знаÑениÑ.
time
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° знаÑÐµÐ½Ð¸Ñ Ð²Ñемени без ÑаÑового поÑÑа.
url
: Ðоле Ð´Ð»Ñ ÑедакÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ URI. ÐведÑнное знаÑение должно ÑодеÑжаÑÑ Ð»Ð¸Ð±Ð¾ пÑÑÑÑÑ ÑÑÑокÑ, либо допÑÑÑимÑй абÑолÑÑнÑй URL. РпÑоÑивном ÑлÑÑае знаÑение не бÑÐ´ÐµÑ Ð¿ÑинÑÑо. ÐеÑÐµÐ²Ð¾Ð´Ñ ÑÑÑок, лидиÑÑÑÑие и завеÑÑаÑÑие пÑобелÑнÑе ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ Ð±ÑдÑÑ Ð°Ð²ÑомаÑиÑеÑки ÑÐ´Ð°Ð»ÐµÐ½Ñ Ð¸Ð· введÑнного знаÑениÑ. Ðожно иÑполÑзоваÑÑ Ñакие аÑÑибÑÑÑ ÐºÐ°Ðº pattern или maxlength, ÑÑÐ¾Ð±Ñ Ð¾Ð³ÑаниÑиÑÑ Ð²Ð²Ð¾Ð´Ð¸Ð¼Ñе знаÑениÑ. ÐÑевдоклаÑÑÑ CSS :valid
and :invalid
пÑименÑÑÑÑÑ Ð¿Ñи необÑ
одимоÑÑи.
week
: ÐÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° даÑÑ, ÑодеÑжаÑей ÑиÑло неделÑ-год и Ð½Ð¾Ð¼ÐµÑ Ð½ÐµÐ´ÐµÐ»Ð¸ без ÑаÑового поÑÑа.
accept
Ð ÑлÑÑае, еÑли знаÑением аÑÑибÑÑа type ÑвлÑеÑÑÑ file
, даннÑй аÑÑибÑÑ Ð¾Ð¿ÑеделÑÐµÑ ÑÐ¸Ð¿Ñ Ñайлов, коÑоÑÑе ÑеÑÐ²ÐµÑ Ð¼Ð¾Ð¶ÐµÑ Ð¿ÑинÑÑÑ. РпÑоÑивном ÑлÑÑае Ñайл игноÑиÑÑеÑÑÑ. ÐнаÑение должно бÑÑÑ ÑпиÑком ÑникалÑнÑÑ
ÑпеÑиÑикаÑоÑов Ñипов ÑодеÑжаниÑ, ÑазделÑннÑм запÑÑÑми:
accesskey
ÐдиноÑнÑй Ñимвол, коÑоÑÑй полÑзоваÑÐµÐ»Ñ Ð¼Ð¾Ð¶ÐµÑ Ð½Ð°Ð¶Ð°ÑÑ, ÑÑÐ¾Ð±Ñ Ð¿ÐµÑеклÑÑиÑÑ ÑокÑÑ Ð½Ð° ÑÐ»ÐµÐ¼ÐµÐ½Ñ ÑпÑавлениÑ.
mozactionhint
Ðе ÑÑандаÑÑно
ÐпÑеделÑÐµÑ "дейÑÑвие-подÑказкÑ", коÑоÑÐ°Ñ Ð¸ÑполÑзÑеÑÑÑ Ð´Ð»Ñ Ð¾Ð¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ñого, как бÑÐ´ÐµÑ Ð¾Ð±Ð¾Ð·Ð½Ð°ÑаÑÑÑÑ ÐºÐ»Ð°Ð²Ð¸Ñа enter на мобилÑнÑÑ
ÑÑÑÑойÑÑваÑ
Ñ Ð²Ð¸ÑÑÑалÑной клавиаÑÑÑой. ÐоддеÑживаемÑе знаÑениÑ: go
, done
, next
, search
, и send
; они авÑомаÑиÑеÑки ÑопоÑÑавлÑÑÑÑÑ Ñ Ð½ÐµÐ¾Ð±Ñ
одимой ÑÑÑокой (ÑвлÑÑÑÑÑ ÑÑвÑÑвиÑелÑнÑми к ÑегиÑÑÑÑ).
autocomplete
ÐÑÐ¾Ñ Ð°ÑÑибÑÑ ÑказÑваеÑ, ÑазÑеÑено ли авÑомаÑиÑеÑкое заполнение Ð¿Ð¾Ð»Ñ Ð±ÑаÑзеÑом. РазÑеÑено по ÑмолÑаниÑ, даже еÑли не Ñказано. ÐаннÑй аÑÑибÑÑ Ð¸Ð³Ð½Ð¾ÑиÑÑеÑÑÑ, еÑли аÑÑибÑÑ type Ñавен hidden, password,
checkbox
, radio
, file
, или type кнопка (button
, submit
, reset
, image
). ÐозможнÑе знаÑениÑ:
off
: ÐолÑзоваÑÐµÐ»Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ каждÑй Ñаз полноÑÑÑÑ Ð²Ð²Ð¾Ð´Ð¸ÑÑ Ð·Ð½Ð°Ñение в поле или докÑÐ¼ÐµÐ½Ñ Ð¿ÑедÑÑмаÑÑÐ¸Ð²Ð°ÐµÑ Ñвой ÑобÑÑвеннÑй меÑод авÑозаполнениÑ; бÑаÑÐ·ÐµÑ Ð½Ðµ Ð´ÐµÐ»Ð°ÐµÑ Ð°Ð²ÑомаÑиÑеÑкого Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð·Ð°Ð¿Ð¸Ñи.on
: ÐÑаÑÐ·ÐµÑ Ð°Ð²ÑомаÑиÑеÑки заканÑÐ¸Ð²Ð°ÐµÑ Ð·Ð½Ð°Ñение полÑ, оÑновÑваÑÑÑ Ð½Ð° знаÑениÑÑ
, коÑоÑÑе вводилиÑÑ Ð¿Ð¾Ð»ÑзоваÑелем Ñанее.ÐÑли не аÑÑибÑÑ autocomplete не Ñказан в <input>
, Ñогда бÑаÑÐ·ÐµÑ Ð¸ÑполÑзÑÐµÑ Ð°ÑÑибÑÑ autocomplete ÑоÑмÑ, коÑоÑÐ°Ñ ÑвлÑеÑÑÑ ÑодиÑелÑÑкой Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ ÑоÑмÑ. The form owner is either the form
element that this <input>
element is a descendant of or the form element whose id is specified by the form attribute of the input element. For more information, see the autocomplete
attribute in <form>
.autofocus
This Boolean attribute lets you specify that a form control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form element in a document can have the autofocus attribute, which is a Boolean. It cannot be applied if the type attribute is set to hidden
(that is, you cannot automatically set focus to a hidden control).
autosave
This attribute should be defined as a unique value. If the value of the type attribute is search
, previous search term values will persist in the dropdown across page load.
checked
When the value of the type attribute is radio
or checkbox
, the presence of this Boolean attribute indicates that the control is selected by default; otherwise it is ignored.
disabled
This Boolean attribute indicates that the form control is not available for interaction. In particular, the click
event will not be dispatched on disabled controls. Also, a disabled control's value isn't submitted with the form.
form
The form element that the input element is associated with (its form owner). The value of the attribute must be an id of a <form>
element in the same document. If this attribute is not specified, this <input>
element must be a descendant of a <form>
element. This attribute enables you to place <input>
elements anywhere within a document, not just as descendants of their form elements. An input can only be associated with one form.
formaction
The URI of a program that processes the information submitted by the input element, if it is a submit button or image. If specified, it overrides the action
attribute of the element's form owner.
formenctype
If the input element is a submit button or image, this attribute specifies the type of content that is used to submit the form to the server. Possible values are:
application/x-www-form-urlencoded
: The default value if the attribute is not specified.multipart/form-data
: Use this value if you are using an <input>
element with the type
attribute set to file
.text/plain
If this attribute is specified, it overrides the enctype
attribute of the element's form owner.formmethod
If the input element is a submit button or image, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:
post
: The data from the form is included in the body of the form and is sent to the server.get
: The data from the form are appended to the form attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.If specified, this attribute overrides the method
attribute of the element's form owner.formnovalidate
If the input element is a submit button or image, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate
attribute of the element's form owner.
formtarget
If the input element is a submit button or image, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). If this attribute is specified, it overrides the target
attribute of the elements's form owner. The following keywords have special meanings:
_self
: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified._blank
: Load the response into a new unnamed browsing context._parent
: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as _self
._top
: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self
.height
If the value of the type attribute is image
, this attribute defines the height of the image displayed for the button.
inputmode
A hint to the browser for which keyboard to display. This attribute applies when the value of the type attribute is text, password, email, or url. Possible values are:
verbatim
: Alphanumeric, non-prose content such as usernames and passwords.latin
: Latin-script input in the user's preferred language with typing aids such as text prediction enabled. For human-to-computer communication such as search boxes.latin-name
: As latin, but for human names.latin-prose
: As latin, but with more aggressive typing aids. For human-to-human communication such as instant messaging for email.full-width-latin
: As latin-prose, but for the user's secondary languages.kana
: Kana or romaji input, typically hiragana input, using full-width characters, with support for converting to kanji. Intended for Japanese text input.katakana
: Katakana input, using full-width characters, with support for converting to kanji. Intended for Japanese text input.numeric
: Numeric input, including keys for the digits 0 to 9, the user's preferred thousands separator character, and the character for indicating negative numbers. Intended for numeric codes, e.g. credit card numbers. For actual numbers, prefer using <input type="number">tel
: Telephone input, including asterisk and pound key. Use <input type="tel"> if possible instead.email
: Email input. Use <input type="email"> if possible instead.url
: URL input. Use <input type="url"> if possible instead.list
РаÑÑибÑÑе ÑказÑÐ²Ð°ÐµÑ id
ÑлеменÑа <datalist>
, в коÑоÑом наÑ
одиÑÑÑ ÑпиÑок пÑедопÑеделÑннÑÑ
знаÑений Ð´Ð»Ñ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ. ÐÑаÑÐ·ÐµÑ Ð¾ÑобÑÐ°Ð¶Ð°ÐµÑ ÑолÑко Ñе ваÑианÑÑ, коÑоÑÑе ÑооÑвеÑÑÑвÑÑÑ Ð²Ð²ÐµÐ´ÑннÑм Ñимволами. ÐÑÐ¾Ñ Ð°ÑÑибÑÑ Ð¸Ð³Ð½Ð¾ÑиÑÑеÑÑÑ, когда аÑÑибÑÑ type пÑÐ¸Ð½Ð¸Ð¼Ð°ÐµÑ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ hidden
, checkbox
, radio
, file
, или type в каÑеÑÑве кнопки.
max
The maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value.
maxlength
If the value of the type attribute is text
, email
,search
, password
, tel
, or url
, this attribute specifies the maximum number of characters (in Unicode code points) that the user can enter; for other control types, it is ignored. It can exceed the value of the size attribute. If it is not specified, the user can enter an unlimited number of characters. Specifying a negative number results in the default behavior; that is, the user can enter an unlimited number of characters. The constraint is evaluated only when the value of the attribute has been changed.
min
The minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value.
minlength
If the value of the type attribute is text
, email
, search
, password
, tel
, or url
, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter; for other control types, it is ignored.
multiple
ÐÑÐ¾Ñ Boolean аÑÑибÑÑ ÑказÑваеÑ, Ð¼Ð¾Ð¶ÐµÑ Ð»Ð¸ полÑзоваÑÐµÐ»Ñ Ð²Ð²Ð¾Ð´Ð¸ÑÑ Ð½ÐµÑколÑко знаÑений. ÐÑÐ¾Ñ Ð°ÑÑибÑÑ Ð¿ÑименÑеÑÑÑ, еÑли Ð´Ð»Ñ Ð°ÑÑибÑÑа type задано знаÑение email
или file
; в пÑоÑивном ÑлÑÑае он игноÑиÑÑеÑÑÑ.
name
The name of the control, which is submitted with the form data.
pattern
A regular expression that the control's value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is text
, search
, tel
, url
or email
; otherwise it is ignored. The regular expression language is the same as JavaScript's. The pattern is not surrounded by forward slashes.
placeholder
A hint to the user of what can be entered in the control . The placeholder text must not contain carriage returns or line-feeds. This attribute applies when the value of the type attribute is text
, search
, tel
, url
or email
; otherwise it is ignored.
ÐÑимеÑание: Do not use the placeholder
attribute instead of a <label>
element. Their purposes are different: the <label>
attribute describes the role of the form element; that is, it indicates what kind of information is expected, the placeholder
attribute is a hint about the format the content should take. There are cases in which the placeholder
attribute is never displayed to the user, so the form must be understandable without it.
readonly
This Boolean attribute indicates that the user cannot modify the value of the control. This attribute is ignored if the value of the type attribute is hidden
, range
, color
, checkbox
, radio
, file
, or a button type.
required
This attribute specifies that the user must fill in a value before submitting a form. It cannot be used when the type attribute is hidden
, image
, or a button type (submit
, reset
, or button
). The :optional
and :required
CSS pseudo-classes will be applied to the field as appropriate.
selectionDirection
The direction in which selection occurred. This is "forward" if the selection was made from left-to-right in an LTR locale or right-to-left in an RTL locale, or "backward" if the selection was made in the opposite direction. This can be "none" if the selection direction is unknown.
size
The initial size of the control. This value is in pixels unless the value of the type attribute is text
or password
, in which case, it is an integer number of characters. Starting in HTML5, this attribute applies only when the type attribute is set to text
, search
, tel
, url
, email
, or password
; otherwise it is ignored. In addition, the size must be greater than zero. If you don't specify a size, a default value of 20 is used.
spellcheck
Setting the value of this attribute to true
indicates that the element needs to have its spelling and grammar checked. The value default
indicates that the element is to act according to a default behavior, possibly based on the parent element's own spellcheck
value. The value false
indicates that the element should not be checked.
src
If the value of the type attribute is image
, this attribute specifies a URI for the location of an image to display on the graphical submit button; otherwise it is ignored.
step
Works with the min and max attributes to limit the increments at which a numeric or date-time value can be set. It can be the string any
or a positive floating point number. If this attribute is not set to any
, the control accepts only values at multiples of the step value greater than the minimum.
tabindex
The position of the element in the tabbing navigation order for the current document.
usemap
The name of a <map>
element to as an image map.
value
The initial value of the control. This attribute is optional except when the value of the type attribute is radio
or checkbox
. Note that when reloading the page, Gecko and IE will ignore the value specified in the HTML source, if the value was changed before the reload.
width
If the value of the type attribute is image
, this attribute defines the width of the image displayed for the button.
x-moz-errormessage
Ðе ÑÑандаÑÑно
This Mozilla extension allows you to specify the error message to display when a field doesn't successfully validate.
ÐÑимеÑание: Starting in Gecko 2.0, calling the click()
method on an <input>
element of type "file" opens the file picker and lets the user select files. See Using files from web applications for an example and more details.
You can't set the value of a file picker from a script; doing something like the following has no effect:
var e = getElementById("someFileInputElement");
e.value = "foo";
Error messages
If you want Firefox to present a custom error message when a field fails to validate, you can use the x-moz-errormessage
attribute to do so:
<input
type="email"
x-moz-errormessage="Please specify a valid email address." />
Note, however, that this is not standard and will not have an effect on other browsers.
Examples A simple input box<!-- A basic input -->
<input type="text" name="input" value="Type here" />
A common use-case scenario
<!-- A common form that includes input tags -->
<form action="getform.php" method="get">
First name: <input type="text" name="first_name" /><br />
Last name: <input type="text" name="last_name" /><br />
E-mail: <input type="email" name="user_email" /><br />
<input type="submit" value="Submit" />
</form>
СпеÑиÑикаÑии СовмеÑÑимоÑÑÑ Ñ Ð±ÑаÑзеÑами
[1] РаÑпознаÑÑÑÑ, но UI оÑÑÑÑÑÑвÑеÑ.
[2] ÐÑÑÑÑÑÑвÑÐµÑ Ð´Ð»Ñ type="checkbox"
и type="radio"
.
[3] Ð Safari autocapitalize="words"
пеÑÐµÐ²Ð¾Ð´Ð¸Ñ Ð² веÑÑ
ний ÑегиÑÑÑ ÐºÐ°Ð¶Ð´Ñй вÑоÑой Ñимвол Ñлова.
[4] datetime
бÑл ÑдалÑн из ÑпеÑиÑикаÑии и бÑаÑзеÑов в полÑÐ·Ñ datetime-local
.
[5] См Firefox bug 1355389
[6] ÐÑÑ Ð½Ðµ имплеменÑиÑовано. ÐаблÑдаÑÑ: Firefox bug 888320 и TPE DOM/Date time input types.
Gecko notesStarting in Gecko 9.0, Firefox for Android lets users capture images using their camera and upload them, without having to leave the browser. Web developers can implement this feature by simply specifying setting the accept
attribute's value to "image/*" on their file
input, like this:
<input type="file" accept="image/*">
Firefox for Android sets a default background-image
gradient on all type="text"
, type="file"
, type="button"
, and type="submit"
inputs. This can be disabled using background-image: none
.
Firefox for Android also sets a default border
on all <input type="file">
elements.
<form>
, <button>
, <datalist>
, <legend>
, <label>
, <select>
, <optgroup>
, <option>
, <textarea>
, <fieldset>
, <output>
, <progress>
and <meter>
.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4