Wednesday, September 4, 2013

Javascript: Decode character pressed from keydown()'s event handler

Use:
// 'event' comes from handler params
var character = String.fromCharCode(event.which): // 'character' has the pressed char

Resource: http://stackoverflow.com/questions/2220196/how-to-decode-character-pressed-from-jquerys-keydowns-event-handler

No comments: