Posted By


jlvallelonga on 03/24/09

Tagged


Statistics


Viewed 466 times
Favorited by 0 user(s)

pressedPrintableChar


/ Published in: JavaScript
Save to your folder(s)

to use this function send in an ASCII character code (use my getKeyCode function)
it will return true if the code corresponds to a printable character (not backspace code - 8, enter code - 13, or "undefined")


Copy this code and paste it in your HTML
  1. function pressedPrintableChar(code) {
  2. if (code != 8 && code != 13 && code + "" != "undefined")
  3. return true;
  4. return false;
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.