开发者

keypress bug in FF?

$('input').keypress(function(e){
        var k = e.keyCode ? e.keyCode : e.which;                                     
        console.log(k);     
});
<input type="text" name=""  autocomplete="off"/>

In FF for '.' (point) and for 'delete' it is th开发者_如何转开发e same code 46. AND for 'right' (right arrow) and for ' it is the same code 39. just to be 'safe' Chrome and IE7 don't fire nothing for keys like arrows, delete, insert, backspace etc


Not really a bug per-say, just one of the many browser differences. If you look on your number-pad, they are the same key, their mapping points to that key.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜