Home | Top | Website design | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.


USEMAP Attribute | useMap Property

Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.

This property now applies to the object and input objects.

Syntax

HTML Scripting
< ELEMENT USEMAP = sURL ... >
object.useMap [ = sURL ]

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.

Example

This 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 USEMAP ="#map1" ID=idImg SRC="image.gif">
<BUTTON onclick="idImg. useMap ='#map2'"> Change Maps</BUTTON>

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

Platform Version
Win16:
Win32:
Windows CE:
Unix:
Mac:
 
IMG , OBJECT , INPUT
Home | Top | Website design | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Bitcoin Gambling - The Original Crypto Dice Game . https://vdhaonline.org