Note: This documentation is preliminary and is subject to change.
Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
Syntax
HTML | <ELEMENT USEMAP
= sURL... >
|
---|
Scripting | [ sURL = ] object.useMap |
---|
Possible Values
sURL | String that
specifies or receives the URL of the image map. |
The property is read/write.
The property has no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.
Remarks
The useMap property identifies the image as a client-side image map by associating a map object with the image. This map object contains area objects that define regions within the image. The user can click these regions to navigate to a designated URL.
You can dynamically assign the maps to the image through the useMap property.
In Microsoft Internet Explorer 6 and greater, this property applies to the object and input objects.
Examples
The following examples demonstrate how useMap works with an image, an object, and an input
The following example defines the map.
<MAP NAME="map1">
<AREA NAME="area1" COORDS="4,20,20,40" href="usemap left arrow.htm" target="frame1"/>
<AREA NAME="area2" COORDS="116,20,100,40" href="usemap right arrow.htm" target="frame1"/>
</MAP>
The following example shows useMap with an image.
<IMG USEMAP="#map1" ID=idImg BORDER="0" SRC="double_pointed_arrow.gif">
The following example shows useMap with an object.
<OBJECT data="double_pointed_arrow.gif" border="0" type="image/gif" usemap="#map1">
</OBJECT>
The following example shows useMap with an input.
<INPUT src="double_pointed_arrow.gif" style="border-collapse:collapse" type="Image" usemap="#map1">
</INPUT>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Standards Information
This property is defined in
HTML 3.2 and
is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To