尝试让获取焦点的元素失去焦点,document.activeElement.blur()

 

js实现焦点进入文本框内关闭输入法:imeMode
2011-05-26 11:23
要用到的东西: 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' " /> 这个应该算最常用的了,其他可以不记

相关文章:

  • 2022-12-23
  • 2021-08-13
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2021-10-24
  • 2022-12-23
  • 2022-01-24
  • 2022-01-14
  • 2022-12-23
  • 2021-08-06
  • 2021-07-08
相关资源
相似解决方案