-
[HTML] input tag : autocomplete, type, required, readonly, disabled, 모바일 기기에서 제공컴퓨터/HTML & CSS 2020. 2. 4. 20:32
* 읽어보기 : www.freecodecamp.org/news/what-is-sql-injection-how-to-prevent-it/
SQL injection 대비하기
* readonly, disabled
읽기만 가능할 뿐 변경은 불가능하다.<input type="text" value="only read" readonly > <input type="text" value="only read" disabled >
차이점 : form으로 값을 보낼 때 disabled의 값은 전송되지 않는다
* autocomplete
자동 완성 기능 끄기
<input autocomplete="off" name="name" type="text">
* type="file"<input type="file" name="upload-file" accept="image/*" class="file-upload__input" />
file 이외에도 : password, number, telephone(tel), email, url, search, Datetime-local, date, time, month, week, color, range 등 가능
accept: 파일 탐색기 열 때 해당 파일 형식만 뜨도록 한다. Note: 다른 형식 첨부 가능 주의!
* required: 필수값<Input name="user-id" value={id} onChange={onChangeId} required/>
* name, value 속성 필요
* 모바일 기기에서 제공되는 키보드 확인하기
https://inputtypes.com/
input 태그 타입, 패턴, 모드에 따라 어떤 키보드가 제공되는지 확인할 수 있다type="Month" type="range" type="Color" '컴퓨터 > HTML & CSS' 카테고리의 다른 글
[CSS] IOS 노치 화면 safearea 이슈 (0) 2021.08.12 image 색깔 바꾸기 (0) 2020.03.27 width N height of elements (0) 2019.10.22 display: grid (0) 2019.10.02 (공백) (0) 2019.08.28