The disabled Input Method attribute ime-mode is the latest attribute added in CSS3. More accurately, it is the newly added attribute of CSS Basic User Interface Module Level 3 (CSS3 UI) specification. However, ie supports this attribute from IE5 and FireFox also supports this attribute from FireFox3.0.ime-modeAttribute. However, chrome, opera, and Safari do not yet support this attribute. This attribute controls the status of the text field Input Method Editor:
| Name: |
Ime-mode |
| Value: |
Auto | normal | active | inactive | disabled | inherit |
| Initial Value: |
Auto |
| Application element: |
Text fields) |
| Inheritance: |
No |
Auto: default value, which does not affect the status of the current input method editor.
Normal: the status of the input method editor should be normal. This value can be used for the user style sheet to overwrite the page settings. Internet Explorer does not support this attribute
Active: the status of the Input Method Editor is activated at the beginning. The input always uses the input method until the user switches the input method. This attribute is not supported in Linux
Inactive: the status of the Input Method Editor is not activated at the beginning, unless the user activates the Input Method
Disabled: Disable the Input Method Editor. The input method editor may not be activated by users.
Instance:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
The preceding example is run in IE5 + or FireFox3 + browsers. Chinese characters cannot be entered.
Although this attribute is powerful, it is not supported in the latest chrome, opera, and safari browsers, therefore, JavaScript is also required in these browsers to make it impossible for users to enter Chinese characters in the text box.
References:
- Ime-mode-CSS | MDN
- CSS Basic User Interface Module Level 3 (CSS3 UI)
- ImeMode Property