Javascript e.keyCode doesn't catch Backspace/Del in IE

后端 未结 2 1491
误落风尘
误落风尘 2020-12-15 05:47

I\'m trying to catch the pressing event of Backspace and Delete keys using javascript/jQuery with this kind of code.

$(\"textarea[name=txt]\").keypress(funct         


        
2条回答
  •  再見小時候
    2020-12-15 06:31

    Key Code for Backspace will take the value = 83 if we already have a few characters in a Text Box .

    The Key Code will be = 8 if there are NO Characters in the Text Box and we are trying to Hit Backspace.

提交回复
热议问题