Home > Web Front-end > JS Tutorial > body text

Compatibility testing of keyCode, which and charCode in keyboard events_Basic knowledge

WBOY
Release: 2016-05-16 19:18:20
Original
1270 people have browsed it

Test results:
Under IE:
>> supports keyCode
>> does not support which and charCode, both values ​​are undefined

Under Firefox:
>> Supports keyCode. Except for function keys, other key values ​​are always 0
>> Supports which and charCode, the values ​​of which are the same

Under Opera:
> > Support keyCode and which, both have the same value
>> CharCode is not supported, the value is undefined


[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template