Home >Web Front-end >JS Tutorial >JavaScript implements focus into the text box and closes the input method code sharing

JavaScript implements focus into the text box and closes the input method code sharing

小云云
小云云Original
2018-02-05 10:47:491524browse

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=&#39;active&#39; " />
<INPUT onfocus=" this.style.imeMode=&#39;inactive&#39; " />
<INPUT onfocus=" this.style.imeMode=&#39;auto&#39; " />
<INPUT onfocus=" this.style.imeMode=&#39;disabled&#39; " />

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!

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