usemap 属性将图像定义为客户端图像映射(一个可点击的链接区域),usemap属性与元素map图像关联的name部分(不用写'#') URL(usemap属性以 '#' 开始的部分)。

<p><img src="/Template/Test/img/ditu.png" width="571" height="260" border="0" usemap="#Map"> <map name="Map"> <area shape="rect" coords="39,101,159,127" href="/Template/Test/anli/HTML_tyzx.html" target="_blank"> <area shape="rect" coords="239,125,296,162" href="/Template/Test/anli/HTML_ymjc.html" target="_blank"> <area shape="rect" coords="392,90,437,130" href="/Template/Test/anli/HTML_wqc.html" target="_blank"> </map> </p>
![]() | <img> 元素不属于 <a> 或 <button> 元素的后代时,才允许使用 usemap 属性。 |





<img usemap="#map标签的name属性值">
| 值 | 描述 |
|---|---|
| usemap属性值 | 字符 ("#") 加上要使用的 <map> 元素的 name 或 id的值。 |