Disable the input method with CSS (CSS3 UI Specification)

Source: Internet
Author: User

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:

  1. Ime-mode-CSS | MDN
  2. CSS Basic User Interface Module Level 3 (CSS3 UI)
  3. ImeMode Property

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.