Chapter 9: Handling Events

Return to Chapter 9

 

To use this script on your own page, click in the text area below, select all, and copy to grab the script. Then, just paste into your own page — and you're done.

Mouse Event Handling: onmousemove

See it run: Mouse Event Handling: onmousemove

Script 9.10

This is the HTML for the following-eyes example.

Script 9.11

This is the CSS for the following-eyes example.

Script 9.12

This JavaScript allows you to keep the pictures of the eyes following the mouse cursor.

Images:

circle.gif
lilRed.gif