在谷歌浏览器中禁用ime模式 [英] disable ime mode in google chrome
本文介绍了在谷歌浏览器中禁用ime模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用css或其他方法禁用IME?我的问题是,当将语言更改为日语时,在文本框中输入了双字节数字,我需要防止这种情况
How to disable IME using css or anyother method ?My problem is that,When change language to japanese,Double byte numbers are entered in text box,I need to prevent this
我使用
style="ime-mode:disabled"
它适用于除谷歌浏览器之外的所有其他浏览器。
It works all other browsers except google chrome.
推荐答案
将属性类型更改为tel。就像ime模式在chrome中处于非活动状态,其他浏览器支持html5一样。
change the attribute type to tel. It works just like ime-mode is inactive in chrome and other browsers supports html5.
element.setAttribute('type', 'tel');
我建议您同时使用 ime-mode 和类型= tel
样式:ime-mode
Chrome Firefox (Gecko) IE Opera Safari (WebKit)
Not supported 3.0 (1.9) 5.0 Not supported Not supported
输入类型= tel
Chrome Firefox IE Opera Safari Safari Mobile
6+ 4+ 10+ 10.6+ 5.1+ iOS 3.1+
同时使用
Chrome Firefox IE Opera Safari Safari Mobile
6+ 3.0 (1.9) 5.0 10.6+ 5.1+ iOS 3.1+
这篇关于在谷歌浏览器中禁用ime模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文