Simulate an Area object's onClick using the HREF attribute. The following example uses an Area object's HREF attribute to execute a JavaScript function. The image displayed, colors.gif , shows two sample colors. The top half of the image is the color antiquewhite, and the bottom half is white. When the user clicks the top or bottom half of the image, the function setBGColor changes the document's background color to the color shown in the image.
Parameters event The name of an event for which the specified object has an event handler.
Description For information on handling events, see the Client-Side JavaScript Guide . Property of Link Implemented in JavaScript 1.0 Security JavaScript 1.1. This property is tainted by default. For information on data tainting, see the Client-Side JavaScript Guide . This property applies to HTTP URLs only.