useMap
all
alt
ch
dir
id
low
min
rel
top
url
URL
urn
TOC
Kutista sisällysluettelo
Laajenna sisällysluettelo
EN
Tätä sisältöä ei ole saatavilla kielelläsi. Tässä on englanninkielinen versio.

usemap attribute | useMap property

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

HTML 4.01 Specification, Section 13.6.1

 

Syntax

HTML<element usemap="p" ... >
JavaScript

p = object.useMap

 

Property values

Type: String

The URL of the image map.

Standards information

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 objects..

Examples

The following example defines the map. Clicking within the rectangular areas of the map loads a new page into a target window named frame1.


<map name="map1">
  <area coords="4,20,20,40" href="left_arrow.htm" name="area1" target="frame1" />
  <area coords="116,20,100,40" href="right_arrow.htm" name="area2" target="frame1" />
</map>


The following example shows usemap with an image.


<img usemap="#map1" border="0" src="double_pointed_arrow.png">

The following example shows usemap with an object. This technique requires Internet Explorer 8 and later.


<object border="0" data="double_pointed_arrow.png" type="image/gif" usemap="#map1">
</object> 

See also

img
input
object

 

 

Näytä:
© 2016 Microsoft