控制输入为英文状态
<INPUT TYPE = text STYLE = "ime-mode:active" name=a>
<INPUT TYPE = button onclick="a.style.imeMode='disabled'" value=change"">
刚从CSDN学来的
语法:
ime-mode : auto | active | inactive | disabled
参数:
auto : 不影响IME的状态。与不指定ime-mode属性时相同
active : 指定所有使用IME输入的字符。即激活本地语言输入法。用户仍可以撤销激活IME
inactive : 指定所有不使用IME输入的字符。即激活非本地语言。用户仍可以撤销激活IME
disabled : 完全禁用IME。对于有焦点的控件(如输入框),用户不可以激活IME
例:
<INPUT TYPE="text" NAME="txtIme1" STYLE = "ime-mode:active">
<INPUT TYPE="text" NAME="txtIme2" STYLE = "ime-mode:disabled">
<INPUT TYPE="text" NAME="txtIme3" STYLE = "ime-mode:inactive">
<INPUT TYPE="text" NAME="txtIme4" STYLE = "ime-mode:auto">
<INPUT TYPE="text" NAME="txtIme5" STYLE = "ime-mode:disabled;text-align:right">
<INPUT TYPE="text" NAME="txtIme6" STYLE = "ime-mode:inactive;text-align:right">
<INPUT TYPE = button onclick="a.style.imeMode='disabled'" value=change"">
刚从CSDN学来的
语法:
ime-mode : auto | active | inactive | disabled
参数:
auto : 不影响IME的状态。与不指定ime-mode属性时相同
active : 指定所有使用IME输入的字符。即激活本地语言输入法。用户仍可以撤销激活IME
inactive : 指定所有不使用IME输入的字符。即激活非本地语言。用户仍可以撤销激活IME
disabled : 完全禁用IME。对于有焦点的控件(如输入框),用户不可以激活IME
例:
<INPUT TYPE="text" NAME="txtIme1" STYLE = "ime-mode:active">
<INPUT TYPE="text" NAME="txtIme2" STYLE = "ime-mode:disabled">
<INPUT TYPE="text" NAME="txtIme3" STYLE = "ime-mode:inactive">
<INPUT TYPE="text" NAME="txtIme4" STYLE = "ime-mode:auto">
<INPUT TYPE="text" NAME="txtIme5" STYLE = "ime-mode:disabled;text-align:right">
<INPUT TYPE="text" NAME="txtIme6" STYLE = "ime-mode:inactive;text-align:right">
我来自:向东博客