jQuery/Javascript - Reject "control" keys on keyDown event

What is the **cleanest** way in JavaScript or jQuery to filter out *control keys*. By *control keys*, I mean any key that IS NOT A-Z, 0-9, or special characters (i.e. !, @, #, etc.). I simply want to filter out keys such as 'Shift', 'Alt', F1- F9, Caps Lock, etc. I'm sure I could check each individual ASCII code from the event argument...but I'm wondering if there is a "cleaner" solution. *Note: I'm developing an application specifically for IE 8*

以上就是jQuery/Javascript - Reject "control" keys on keyDown event的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准