Web/Html/Css
입력 양식에서 한영 입력 제한하기...
Huikyun
2009. 4. 3. 13:09
회원등록하는 페이지의 경우 아이디는 영문숫자로만 입력받고 싶을 때가 있다.
이럴때 ime-mode 라는 속성을 스타일로 지정하면 가능하다.
auto(Default) - IME is not affected. This is the same as not specifying the ime-mode attribute.
active - All characters are entered through the IME. Users can still deactivate the IME.
inactive - All characters are entered without IME. Users can still activate the IME.
disabled - IME is completely disabled. Users cannot activate the IME if the control has focus.
active - All characters are entered through the IME. Users can still deactivate the IME.
inactive - All characters are entered without IME. Users can still activate the IME.
disabled - IME is completely disabled. Users cannot activate the IME if the control has focus.
영문숫자만 입력받고자할때는 disabled 값으로 지정하면된다.
style = "ime-mode:auto" (자동변경) (한/영 전환 가능)
style = "ime-mode:active" (한글 모드) (한/영 전환 가능)
style = "ime-mode:inactive" (영문 모드) (오직 영문)
style = "ime-mode:disabled" (영문 모드) (한/영 전환 가능)
style = "ime-mode:deactivated" (한글 모드) (한/영 전환 가능)
style = "ime-mode:active" (한글 모드) (한/영 전환 가능)
style = "ime-mode:inactive" (영문 모드) (오직 영문)
style = "ime-mode:disabled" (영문 모드) (한/영 전환 가능)
style = "ime-mode:deactivated" (한글 모드) (한/영 전환 가능)
예)
Active : <INPUT TYPE = text STYLE = "ime-mode:active" ><br>
Inactive : <INPUT TYPE = text STYLE = "ime-mode:inactive" ><br>
Disabled : <INPUT TYPE = text STYLE = "ime-mode:disabled" ><br>
Inactive : <INPUT TYPE = text STYLE = "ime-mode:inactive" ><br>
Disabled : <INPUT TYPE = text STYLE = "ime-mode:disabled" ><br>
출처 : http://cafe.naver.com/jsearching/