Javascript Chinese text box input method switching problem

  • 2020-03-30 00:45:23
  • OfStack

You can turn off the input method in the page input control by setting ime-mode

When a text field does not require Chinese input, we can reduce the possibility of errors by setting the value of the ime-mode property to inactive or disabled. Similarly, we can set the value of the ime-mode attribute to active for text fields that require Chinese input.

Ime -mode CSS proposal properties

Ime-mode: auto | active | inactive | disabled

Auto: does not affect the state of the IME. The same as when the ime-mode attribute is not specified
Active: specifies all characters entered using the IME. That is to activate the local language input method. Users can still deactivate the IME
Inactive: specifies all characters that do not use IME input. That is, activate the non-native language. Users can still deactivate the IME
Disabled: disable the IME completely. Users cannot activate the IME for focused controls such as input fields

Sets or retrieves whether the user is allowed to activate the input method (IME) status for Chinese, Korean, Japanese, etc.
The corresponding script feature is imeMode.

This is an IE specific style

Related articles: