jQuery to clear textbox value using ESC key

Yesterday worked on interesting thing. Requirement was to clear the textbox text when escape (Esc) key is pressed within textbox. This was easy and simple.
  1. Bind keyup event with textbox/textboxes.
  2. Check the keycode.
  3. If keyCode is 27 (which is for esc key) then clear the text.
$(document).ready(function() {
        if(e.keyCode == 27) {
See result below

See Complete Code
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..