상세 컨텐츠

본문 제목

[html5.2] autocapitalize 텍스트 입력이 자동으로 대문자로 표시

html

by binbing 2018. 4. 3. 10:44

본문

[원본]

The autocapitalize global attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. The attribute must take one of the following values:


off or none, no autocapitalization is applied (all letters default to lowercase)
on or sentences, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase
words, the first letter of each word defaults to a capital letter; all other letters default to lowercase
characters, all letters should default to uppercase


The autocapitalize attribute doesn’t affect behavior when typing on a physical keyboard. Instead it affects the behavior of other input mechanisms, such as virtual keyboards on mobile devices and voice input. The behavior of such mechanisms is that they often assist users by automatically capitalizing the first letter of sentences. The autocapitalize attribute enables authors to override that behavior per-element.

 

The autocapitalize attribute never causes autocapitalization to be enabled for an <input> element with a type attribute whose value is url, email, or password

 


 

[번역]

autocapitalize 전역 속성은 사용자가 입력 / 편집 할 때 텍스트 입력이 자동으로 대문자로 표시되는지 여부와

그 텍스트 입력을 자동으로 대문자로 표시하는 방법을 제어하는 ​​열거 속성입니다.

속성은 다음 값 중 하나를 취해야합니다.

off 또는 none : 자동 대용 문자 적용 안 함 (모든 문자는 소문자로 기본 설정 됨)
on 또는 sentence : 각 문장의 첫 글자는 대문자로 기본 설정됩니다. 다른 모든 문자는 소문자로 기본 설정됩니다.
words : 각 단어의 첫 글자는 대문자로 기본 설정됩니다. 다른 모든 문자는 소문자로 기본 설정됩니다.
characters : 모든 문자는 대문자로 기본 설정되어야합니다.

 

autocapitalize 속성은 실제 키보드에서 타이핑 할 때 동작에 영향을 미치지 않습니다.

대신 모바일 장치의 가상 키보드 및 음성 입력과 같은 다른 입력 메커니즘의 동작에 영향을 줍니다.

이러한 메커니즘의 동작은 사용자가 문장의 첫 글자를 자동으로 대문자로 사용하여 사용자를 지원하는 경우가 많다는 것입니다. autocapitalize 속성을 사용하여 작성자는 요소 별 동작을 재정의 할 수 있습니다.

 

autocapitalize 속성은 값이 url, email 또는 password 인 type 속성을 가진 <input> 요소에 대해 자동 대문자 사용을 활성화하지 않습니다.

 

 

 

 

**

그치만 간간히 이메일이나 이름 등을 입력할 때에 대문자로 처음 시작할 때가 있으므로

 

이렇게 써주는 것이 좋을 것 같당!

 

 

 

원본출처 : https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize

관련글 더보기

댓글 영역