Home >Web Front-end >JS Tutorial >JavaScript implements focus into the text box and closes the input method code sharing
This article mainly shares with you the js implementation of closing the input method when the focus enters the text box. The code is simple and easy to understand, very good, and has reference value. Friends who need it can refer to it. I hope it can help everyone.
js implements focus into the text box and closes the input method: 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' " />
Related recommendations:
Text box css close input method_Experience exchange
The above is the detailed content of JavaScript implements focus into the text box and closes the input method code sharing. For more information, please follow other related articles on the PHP Chinese website!