Language References
Sets or retrieves the URL, often with a bookmark extension ( #name ), to use as a client-side image map.
Inline |
<IMG USEMAP = strUrl ... > |
Script |
img.useMap = strUrl ] |
strUrl |
String specifying the URL of the image map. |
The property is read/write with no default value.
Identifies the picture as a client-side image map and specifies a MAP object to use for responding to the user's mouse clicks. Use the MAP and AREA objects to create the client-side mapping information.
The maps may be dynamically assigned to the image through the useMap property.
The following example specifies map1 as the image map underlying image.gif. The map can be changed to another map, "map2", by clicking the button.
<MAP NAME="map1">
<area NAME="area1" COORDS="0,0,40,40"
href="doc1.htm" target="frame1">
<area NAME="area2" COORDS="40,0,80,40"
href="doc2.htm" target="frame1">
<area NAME="area3" COORDS="10,40,40,80"
href="doc3.htm" target="frame1">
<area NAME="area4" COORDS="40,40,80,80"
href="doc4.htm" target="frame1">
</MAp>
...
<img src="image.gif" id=idImg USEMAP="#map1">
...
<button onclick="idImg.useMap='#map2'">
Change Maps</button>
IMG