$(selector).keyup(function)
".keyup()" event binds a function to an event on an element whenever it is triggered. The below examples shows you the change in the style of the input field whenever a keyup and keydown event occurs.
Type in the input fields shown. It will change the background color of the field on each keyup and keydown. Name: Email: URL: Feedback: