`
jessen163
  • 浏览: 457101 次
  • 性别: Icon_minigender_1
  • 来自: 潘多拉
社区版块
存档分类
最新评论

js实现焦点进入文本框内关闭输入法

阅读更多
要用到的东西: imeMode:xxx

有四个参数

active 代表输入法为中文
inactive 代表输入法为英文
auto 代表打开输入法 (默认)
disable 代表关闭输入法


<INPUT onfocus=" this.style.imeMode='active' " />

<INPUT onfocus=" this.style.imeMode='inactive' " />

<INPUT onfocus=" this.style.imeMode='auto' " />

<INPUT onfocus=" this.style.imeMode='disabled' " />
这个应该算最常用的了,其他可以不记
分享到:
评论
2 楼 jessen163 2011-11-30  
我试过了,可以的!
1 楼 tangalexis 2011-11-30  
试过了,没有反应。。

请输入您人姓名:<input type="text" onfocus=" this.style.imeMode='disabled' "/>
<input type="text" onfocus=" this.style.imeMode='active' " />  
  
<input type="text" onfocus=" this.style.imeMode='inactive' " />  
  
<input type="text" onfocus=" this.style.imeMode='auto' " />  


相关推荐

Global site tag (gtag.js) - Google Analytics