Using e.keyCode || e.which; how to determine the difference between lowercase and uppercase?

后端 未结 5 1926
星月不相逢
星月不相逢 2020-12-20 20:32

I am using e.keyCode || e.which; to determine which key was pressed, but I am getting 65 for both a and A why is this happening and ho

5条回答
  •  囚心锁ツ
    2020-12-20 21:19

    keyCode won't indicate which character was input.
    To truly find the character last entered by the user you will need to examine the value of the input and find the last character.

提交回复
热议问题