javaScript event.keyCode键值表 js 捕捉键盘按键

wolaoreme 2011-08-17

keycode8=BackSpaceBackSpace

keycode9=TabTab

keycode12=Clear

keycode13=Enter

keycode16=Shift_L

keycode17=Control_L

keycode18=Alt_L

keycode19=Pause

keycode20=Caps_Lock

keycode27=EscapeEscape

keycode32=spacespace

keycode33=Prior

keycode34=Next

keycode35=End

keycode36=Home

keycode37=Left

keycode38=Up

keycode39=Right

keycode40=Down

keycode41=Select

keycode42=Print

keycode43=Execute

keycode45=Insert

keycode46=Delete

keycode47=Help

keycode48=0equalbraceright

keycode49=1exclamonesuperior

keycode50=2quotedbltwosuperior

keycode51=3sectionthreesuperior

keycode52=4dollar

keycode53=5percent

keycode54=6ampersand

keycode55=7slashbraceleft

keycode56=8parenleftbracketleft

keycode57=9parenrightbracketright

keycode65=aA

keycode66=bB

keycode67=cC

keycode68=dD

keycode69=eEEuroSign

keycode70=fF

keycode71=gG

keycode72=hH

keycode73=iI

keycode74=jJ

keycode75=kK

keycode76=lL

keycode77=mMmu

keycode78=nN

keycode79=oO

keycode80=pP

keycode81=qQat

keycode82=rR

keycode83=sS

keycode84=tT

keycode85=uU

keycode86=vV

keycode87=wW

keycode88=xX

keycode89=yY

keycode90=zZ

keycode96=KP_0KP_0

keycode97=KP_1KP_1

keycode98=KP_2KP_2

keycode99=KP_3KP_3

keycode100=KP_4KP_4

keycode101=KP_5KP_5

keycode102=KP_6KP_6

keycode103=KP_7KP_7

keycode104=KP_8KP_8

keycode105=KP_9KP_9

keycode106=KP_MultiplyKP_Multiply

keycode107=KP_AddKP_Add

keycode108=KP_SeparatorKP_Separator

keycode109=KP_SubtractKP_Subtract

keycode110=KP_DecimalKP_Decimal

keycode111=KP_DivideKP_Divide

keycode112=F1

keycode113=F2

keycode114=F3

keycode115=F4

keycode116=F5

keycode117=F6

keycode118=F7

keycode119=F8

keycode120=F9

keycode121=F10

keycode122=F11

keycode123=F12

keycode124=F13

keycode125=F14

keycode126=F15

keycode127=F16

keycode128=F17

keycode129=F18

keycode130=F19

keycode131=F20

keycode132=F21

keycode133=F22

keycode134=F23

keycode135=F24

keycode136=Num_Lock

keycode137=Scroll_Lock

keycode187=acutegrave

keycode188=commasemicolon

keycode189=minusunderscore

keycode190=periodcolon

keycode192=numbersignapostrophe

keycode210=plusminushyphenmacron

keycode211=

keycode212=copyrightregistered

keycode213=guillemotleftguillemotright

keycode214=masculineordfeminine

keycode215=aeAE

keycode216=centyen

keycode217=questiondownexclamdown

keycode218=onequarteronehalfthreequarters

keycode220=lessgreaterbar

keycode221=plusasteriskasciitilde

keycode227=multiplydivision

keycode228=acircumflexAcircumflex

keycode229=ecircumflexEcircumflex

keycode230=icircumflexIcircumflex

keycode231=ocircumflexOcircumflex

keycode232=ucircumflexUcircumflex

keycode233=ntildeNtilde

keycode234=yacuteYacute

keycode235=oslashOoblique

keycode236=aringAring

keycode237=ccedillaCcedilla

keycode238=thornTHORN

keycode239=ethETH

keycode240=diaeresiscedillacurrency

keycode241=agraveAgraveatildeAtilde

keycode242=egraveEgrave

keycode243=igraveIgrave

keycode244=ograveOgraveotildeOtilde

keycode245=ugraveUgrave

keycode246=adiaeresisAdiaeresis

keycode247=ediaeresisEdiaeresis

keycode248=idiaeresisIdiaeresis

keycode249=odiaeresisOdiaeresis

keycode250=udiaeresisUdiaeresis

keycode251=ssharpquestionbackslash

keycode252=asciicircumdegree

keycode253=3sterling

keycode254=Mode_switch

以下是例子:

#<script>

#functiontest(){

#if(event.keyCode==13){

#alert("捕捉住回车提交事件!");

#}

#}

#</script>

#<inputtype="text"name="t"onkeydown="test();"/>

相关推荐