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

JavaScript focus enters the text box and closes input method code sharing

小云云
小云云Original
2018-02-08 10:23:512202browse

js implements focus into the text box and closes the input method: imeMode. This article mainly shares with you js to implement focus into the text box and closes 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. , hope it can help everyone.

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 opening the input method (default)

disable means turning off 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 focus enters the text box and closes 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