Attribute for <AREA ...>
onClick = "script command(s)"
<AREA ...>| Usage Recommendation |
|---|
| use it, but don't rely on it |
Looking for info on how to make an image map?
See our tutorial How to Make an Image Map<A onClick="..."><INPUT onClick="..."><AREA onClick="...">
In its simplest use, onClick
<AREA HREF="freelance.html" ALT="Freelance"
COORDS="31,0,164,26" SHAPE=RECT
onClick="alert('That was a click')">
which gives us the onClick
If onClickconfirm() command you can cancel or allow the click based on the user's response:
<AREA HREF="logout.html" ALT="Log Out"
COORDS="3,59,37,88" SHAPE=RECT
onClick="return confirm('Are you sure you want to log out?')">
which gives us the onClick
