Sometimes the project needs to prohibit users from entering Chinese characters and symbols to reduce the possibility of incorrect input. css attributes have this function.
The ime-mode syntax is as follows:
Ime-mode: auto | active | inactive | disabled
Valid value:
Auto: default value. The IME (Input Method Editors Input Method Editor) status is not affected. Same as when the ime-mode attribute is not specified
Active: Specify all characters entered using IME. Activate the local language input method. You can still cancel IME activation.
Inactive: specifies all characters that do not use IME. Activate a non-local language. You can still cancel IME activation.
Disabled: Completely disable IME. For controls with focus (such as input boxes), you cannot activate IME.
Therefore
The global style is defined as follows:
. Ime-disabled {ime-mode: disabled;}/* shielded Input Method */
The page-level definition is as follows:
<Input type = "text" name = "mobile" class = "ime-disabled">
Direct reference in ASP. NET
<Asp: TextBox ID = "txtRuling_No" runat = "server" Width = "80px" MaxLength = "8" CssClass = "txt" style = "ime-mode: disabled "> </asp: TextBox>