在文本框中输入外文字符
在 Windows 7 中,您可以配置键盘,以便可以使用不同的语言进行输入。要切换“虚拟”键盘,您必须单击任务栏中的小图标并选择您要输入的语言。
我在一页上有两个文本框,一个用于输入英文字母,另一个用于输入韩文和汉字。我希望用户能够单击一个键盘,输入英语,然后单击另一个键盘,输入韩语,而无需在任务栏中切换键盘(或者最好甚至无需设置备用键盘)。用户会经常切换语言,每次都需要手动切换,非常不方便。
有没有一种方法可以为某个文本框指定您希望该文本框的键盘是特定的键盘?
In Windows 7, you can configure keyboards so that you can type in different languages. To switch "virtual" keyboards, you have to click the little icon in the task bar and select the language in which you want to type.
I have two text boxes on a page, one is for typing English letters and the other is for typing Korean Hangul and Hanja. I would like users to be able to click into one, type English, and click in the other and type Korean without having to switch keyboards in the task bar (or optimally without even having alternate keyboards set up). The user will be switching languages often, so it will be highly inconvenient to have to switch manually every time.
Is there a way to specify for a certain textbox that you want the keyboard for that textbox to be a specific one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
理论上,有一个名为 ime-mode 的 CSS 属性,它应该可以让您控制
input
标记的行为:问题是,浏览器支持非常有限(至少这是 MDN 说)并且它可能不仅仅适用于某些网络浏览器/操作系统组合(即不会运行在 Linux 上)。
In theory there is a CSS property called ime-mode which should let you control the behavior of
input
tags:The problem is, browser support is very limited (at least that is what MDN says) and it might not just work for certain web browser/Operating System combinations (i.e. won't run on Linux).