disable ime mode in google chrome

爷,独闯天下 提交于 2019-12-07 12:11:03

问题


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

I use

     style="ime-mode:disabled"

It works all other browsers except google chrome.


回答1:


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');

I recommend you to use both ime-mode and type="tel"

style: ime-mode

Chrome          Firefox (Gecko)     IE        Opera             Safari (WebKit)
Not supported   3.0 (1.9)           5.0       Not supported     Not supported

input type="tel"

Chrome      Firefox         IE      Opera           Safari      Safari Mobile
6+          4+              10+     10.6+           5.1+        iOS 3.1+

Using Both

Chrome      Firefox         IE      Opera           Safari      Safari Mobile
6+          3.0 (1.9)       5.0     10.6+           5.1+        iOS 3.1+


来源:https://stackoverflow.com/questions/15520410/disable-ime-mode-in-google-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!