This example uses the HTML DOM to assign an "onkeydown" event to an input element.
Press a key inside the text field to set a red background color.