Home >Web Front-end >JS Tutorial >JAVASCRIPT keycode summary_javascript skills

JAVASCRIPT keycode summary_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:56:21948browse

Keypress 的KeyCode:

 

小键盘

大键盘

“-”

45

45

“.”

46

46

0~9

48~57

48~57

“m”

 

109

“n”

 

110

a~z

 

97~122

“`”

 

96

a~i

 

97~105

 

小键盘

大键盘

 

小键盘

大键盘

“m”

 

77

“n”

 

78

“-”

109

189

“.”

110

190

0~9

96~105

48~57

左,上,右,下

 

37~40

“-”

45 45
“.” 46 46
0~9 48~57 48~57
“m”   109
“n”   110
a~z   97~122
“`”   96
a~i   97~105
  Keydown 的keycode:
  小键盘 大键盘
“m”   77
“n”   78
“-” 109 189
“.” 110 190
0~9 96~105 48~57
左,上,右,下   37~40
 Keyup的keycode同keydown相同,注意keydown总是在keypress之前触发,用keyup可以获得用户按键后输入。
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