This example shows how you can execute Javascript in response to keyboard events. It also illustrates how to modify an element's CSS style (in this case, the background-color) from within Javascript.
Type g, r, or b to change the color to green, red, or blue.