Home >Web Front-end >JS Tutorial >Share the core code for closing the input method when the focus enters the text box in JavaScript
This article will share with you js to implement focus into the text box and close the input method. The code is simple and easy to understand, very good, and has reference value. Friends who need it can refer to it
js to implement focus into the text Close the input method in the box: imeMode
Things to be used: imeMode:xxx
has four parameters
active means the input method is Chinese
inactive means the input method is English
auto means open the input method (default)
disable means close the input method
<INPUT onfocus=" this.style.imeMode='active' " /> <INPUT onfocus=" this.style.imeMode='inactive' " /> <INPUT onfocus=" this.style.imeMode='auto' " /> <INPUT onfocus=" this.style.imeMode='disabled' " />
Summarize
The above is the detailed content of Share the core code for closing the input method when the focus enters the text box in JavaScript. For more information, please follow other related articles on the PHP Chinese website!