프로그래밍/Js

[html] inputmode 를 이용하여 상황에 맞는 키패드 보여주기

소행성왕자 2023. 10. 23. 10:45
none
가상 키보드를 사용하지 않아요. 키보드를 직접 구현할 때에 사용합니다.

<input inputmode="none" />
text (default)
기본값으로 제공되고, type 속성에 따라 제공되는 가상 키보드가 표시됩니다.

<input inputmode="text" />
decimal
소수점(.)을 제공하는 숫자형 키보드를 보여줍니다.

<input inputmode="decimal" />

그 외에 

numeric, tel, search, email, url 있습니다.

 

참고 https://developer.mozilla.org/ko/docs/Web/HTML/Global_attributes/inputmode