Knowing both is used as a hint for mobile browsers, I couldn't find a real doc about the difference between using <input type="tel">
and <input inputmode="tel">
. So
The MDN doc suggests using the type. But it's still unclear on the explaination.
If you want only show the "phone keys" like 0 to 9 and * and #, use
<input inputmode="tel">
If you want to show a form field with regular keyboard, use
<input type="tel">
Also see " Everything You Ever Wanted to Know About inputmode ".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.