inputmode
属性は、タッチスクリーンデバイスのブラウザに貴重なヒントを提供し、適切なオンスクリーンキーボードを選択する際にガイドします<input>
および<textarea></textarea>
elements. Unlike altering the input type, inputmode
solely dictates keyboard display, not input interpretation.
While possessing a lengthy history, widespread adoption by major mobile browsers (Safari and Chrome) is relatively recent. Prior implementations in Firefox for Android were short-lived. This support, detailed on caniuse.com, shows version-specific compatibility. Note that my testing suggests Opera Mini and Opera Mobile support contradicts caniuse data.
Although the WHATWG specification documents inputmode
, the W3C 5.2 spec omits it, hinting at potential obsolescence. However, given WHATWG documentation and browser support, we'll consider the WHATWG standard.
inputmode
accepts several values:
none
This value prevents keyboard display in Chrome for Android, though iOS 12.2 shows its default keyboard. It's intended for inputs with custom keyboard controls.
numeric
Highly useful for numerical inputs (PINs, zip codes, etc.). Unlike type="number"
, it allows maxlength
, minlength
, and pattern
attributes, enhancing versatility. While often used with type="tel"
, this is semantically incorrect. The pattern="\d*"
attribute provides a similar effect but limits input strictly to numbers; Android doesn't allow switching to an alphanumeric keyboard, potentially blocking valid entries.
tel
Optimizes telephone number input. It provides a standard telephone keypad (0-9, #, *) with alphabetic mnemonics (ABC, DEF, etc.).
decimal
Produces a keyboard similar to tel
on iOS, replacing the * # key with a decimal point. Android uses the standard numeric keyboard.
email
Includes the @
and .
characters, improving email address entry. iOS's email suggestions might cause confusion. Useful for custom email validation.
url
Facilitates URL entry by including common web address characters (.
, /
) and locale-specific TLDs. Use type="url"
for input validation.
search
Displays a "Go" (iOS) or "Enter" (Android) key, ideal for search forms. type="search"
offers alternative visual cues.
Additional Notes
- Chromium-based Android browsers (Edge, Brave, Opera) mirror Chrome's
inputmode
behavior. - iPad and Android tablet behavior largely mirrors iPhone and Android phones, respectively, excluding third-party keyboards.
-
kana
,katakana
, andlatin-name
values from earlier specifications are no longer implemented. Interestingly,latin-name
on iOS suggests the user's name.
Demo
A live demo showcasing these inputmode
variations is available (link to be provided if a demo is created).
References
- WHATWG specification
- MDN documentation
- caniuse.com
- Chrome Platform Status (Chromium Ticket #244688)
以上がinputModeについて知りたいことはすべての詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

ライブトークやクラス中にインタラクティブなアニメーションを表示しなければならなかった場合、スライドと対話するのが必ずしも簡単ではないことを知っているかもしれません

Astroを使用すると、ビルド中にほとんどのサイトを生成できますが、fuse.jsのようなものを使用して検索機能を処理できるサーバー側のコードが少しあります。このデモでは、ヒューズを使用して、個人の「ブックマーク」セットを検索します。

ドキュメントが保存されている間にGoogleドキュメントに表示されるものと同様に、プロジェクトの1つに通知メッセージを実装したかったのです。言い換えれば、a

サイエンスフィクションの初期の頃から、私たちは私たちに話しかける機械について空想してきました。今日は当たり前です。それでも、作成のための技術

私はその日私たちにワードキャンプにいたので、グーテンバーグがコアにリリースされたときのことを覚えています。数ヶ月が今から経過しているので、ますます私たちのことを想像してください

ほとんどのWebアプリケーションの背後にあるアイデアは、データベースからデータを取得し、可能な限り最良の方法でユーザーに提示することです。そこでデータを扱うとき

&#039;は、理にかなっていると思われることを非常に実行できる状況を少し段階的に実行しますが、CSSのトリックでそれを成し遂げることができます。これで


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

Dreamweaver Mac版
ビジュアル Web 開発ツール

ZendStudio 13.5.1 Mac
強力な PHP 統合開発環境

SAP NetWeaver Server Adapter for Eclipse
Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

DVWA
Damn Vulnerable Web App (DVWA) は、非常に脆弱な PHP/MySQL Web アプリケーションです。その主な目的は、セキュリティ専門家が法的環境でスキルとツールをテストするのに役立ち、Web 開発者が Web アプリケーションを保護するプロセスをより深く理解できるようにし、教師/生徒が教室環境で Web アプリケーションを教え/学習できるようにすることです。安全。 DVWA の目標は、シンプルでわかりやすいインターフェイスを通じて、さまざまな難易度で最も一般的な Web 脆弱性のいくつかを実践することです。このソフトウェアは、
