HTML/CSS
input tag (속성:inputmode, pattern)
- 2024.09.13 10:35:15
[!]html[/!]
<input type="text" inputmode="numeric" pattern="[0-9\-]*" placeholder="숫자와 하이픈 입력 가능">
[!]표현 예시[/!] <input type="text" inputmode="numeric" pattern="\d*" placeholder="숫자만">
<input type="text" inputmode="numeric" pattern="[0-9]{6}" placeholder="생년월일 yymmdd"> <input type="text" inputmode="numeric" pattern="[a-zA-Z]*" placeholder="영문 대소문자만"> <input type="text" inputmode="numeric" pattern="[a-zA-Z\s]*" placeholder="영문 대소문자 공백"> <input type="text" inputmode="numeric" pattern="[a-zA-Z\s]*" placeholder="영문 대소문자 공백"> <input type="text" inputmode="numeric" pattern="(010)-\d{4}-\d{4}" placeholder="010-0000-0000"> |