Home  >  Article  >  Web Front-end  >  Detailed explanation of the use of css ime-mode attribute

Detailed explanation of the use of css ime-mode attribute

黄舟
黄舟Original
2017-06-20 15:58:354243browse

Syntax:

ime-mode : auto | active | inactive | disabled

Parameters:
auto: Does not affect the status of IME. Same as when the ime-modeattribute is not specified
active: Specifies all characters entered using IME. That is to activate the local language input method. The user can still deactivate the IME
inactive: Specify all characters that are not entered using the IME. That is to activate non-native languages. The user can still deactivate the IME
disabled: completely disable the IME. For focused controls (such as input boxes), the user cannot activate the IME

Description:
Set or retrieve whether the user is allowed to activate the input method for inputting Chinese, Korean, Japanese, etc. (IME) status.
The corresponding script feature is imeMode. Please see other books I have written.

Example:

<input type=text style="ime-mode: auto; ">

So

is defined as follows in the global style:

.ime-disabled{ime-mode:disabled;}/* 屏蔽输入法 */

The page level is defined as follows:

<input type="text" name="mobile" class="ime-disabled" >

ASP.NET Direct quote

<asp:TextBox ID="txtRuling_No" runat="server" Width="80px" MaxLength="8" CssClass="txt" style="ime-mode:disabled "></asp:TextBox>

is like this. So when a text field does not require Chinese input, we can reduce the possibility of errors by setting the ime-mode attribute value to inactive or disabled. Similarly, we can set the ime-mode attribute value of those text fields that require Chinese input to active.

Usually C/S business systems will pay attention to the control of input methods. When developing business systems based on B/S, you will definitely encounter the same problem. I believe ime-mode can help. However, FireFox does not support this style single attribute.

Example:

input {ime-mode: auto; }
<form name="form1" method="post" action="">    
<input type="text" name="textfield" style="ime-mode:disabled ">
</form>

The above is the detailed content of Detailed explanation of the use of css ime-mode attribute. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn