Sukarelawan kami masih belum menterjemah artikel ini ke bahasa Melayu. Sertai kami dan bantu melaksanakannya!
Anda juga boleh membaca artikel ini dalam bahasa English (US).

The inputmode global attribute is an enumerated attribute that provides a hint as to the type of data that might be entered by the user while editing the element or its contents. It can have the following values:

"none"
No virtual keyboard; this is useful when the application or site implements its own keyboard input control.
"text"
Standard text input keyboard for the user's current locale.
"decimal"
Fractional numeric input keyboard containing the digits and the appropriate separator character for the user's locale (typically either "." or ","). Devices may or may not show a minus key.
"numeric"
Numeric input keyboard; all that is needed are the digits 0 through 9. Devices may or may not show a minus key.
"tel"
A telephone keypad input, including the digits 0 through 9, the asterisk ("*"), and the pound ("#") key. Form inputs that require a telephone keypad should typically use <input type="tel"> instead.
"search"
A virtual keyboard optimized for search input. For instance, the return key may be re-labeled "Search", and there may be other optimizations.
"email"
A virtual keyboard optimized for entering email addresses; typically this includes the "@" character as well as other optimizations. Form inputs that require email address entry should typically use <input type="email"> instead.
"url"
A  keypad optimized for entering URLs. This may have the "/" key more prominently available, for example. Enhanced features could include history access and the like as well. Form inputs that request a URL should typically use <input type="url"> instead.

If this attribute is not set, its default value is "text", indicating that the locale's standard text entry keyboard should be used.

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'inputmode' in that specification.
Living Standard

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
inputmodeChrome Full support 66Edge ? Firefox No support NoIE ? Opera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android No support NoSafari iOS Full support 12.2Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

Tag Dokumen dan Penyumbang

Penyumbang untuk halaman ini: Annevk, sideshowbarker, qiudongwei, robocat, mdnwebdocs-bot, Sheppy
Terakhir dikemaskini oleh: Annevk,