본문 바로가기

Html,Css,JavaScript

IME 제어하기


---한글 OS ---
1. 영문만 입력가능  : style="ime-mode:disabled"
2. 한/영중 선택가능 : style="ime-mode:auto"
3. 디폴트 한글      : style="ime-mode:active"
4. 디폴트 영문      : style="ime-mode:inactive"

---일본어 OS---
일본어 OS 에서는 어떻게 동작하는지 샘플 소스를 작성해서 확인해보도록 하자
auto          : <input type="text" style = "ime-mode:auto"><br>
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>
deactivated : <input type="text" style = "ime-mode:deactivated"><br>

---현재까지의 정리---
auto------- 바로 전의 설정을 따름 : 즉, 영문 -> 영문, 전각(히라가나, 카타카나) -> 전각
active-----  기본 히라가나, 하지만 직접 카타카나로 해뒀다면 카타카나로 설정된다
inactive---- 기본 전/반각 영문,숫자 입력이 아닌 직접 입력으로 설정
disabled--- 반각 영문, 숫자 입력으로 고정, 변경불가
deactivated 포커스를 잃어버리기 전의 값을 보존

참고자료--------------------------------------------------------------------
Syntax
    HTML { ime-mode : sMode } 
    Scripting [ sMode = ] object.style.imeMode

Possible Values
String that specifies or receives one of the following values.

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. 


[출처] 핑크펜더님의 블로그