Will there be any plan to implement caps lock detection in html5 or some other spec. This seems like a pretty simple functionality to be missing.

有帮助吗?

解决方案

Not that I know of. If you want to do it though this is a reasonable approach.

http://www.codeproject.com/Articles/17180/Detect-Caps-Lock-with-Javascript

Basically the idea is to just test if the letter is capital or not and to compare the result with whether or not the shift key was pressed when typing. There is no way that I am aware of to detect CAPS lock right off the bat in a web application.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top