javascript當(dāng)中MapArea的用法
馬克- to-win:馬克 java社區(qū):防盜版實(shí)名手機(jī)尾號(hào): 73203。
例 4.1(MapAreaShapeIEFF.html)
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<body>
<img
src="markWeChat.jpg"
border="0" usemap="#qixymap"
/>
<map name="qixymap" id="pmap">
<area
shape="circle"
coords="200,50,50"
href ="us.html"
target ="_blank"
alt="us" />
<area
shape="rect"
coords="0,0,100,100"
href ="rect.html"
target ="_blank"
alt="rect" />
</map>
< p>馬克-to-win:<b>注釋?zhuān)?lt;/b>img 元素中的 "usemap" 屬性引用 map 元素中的 "id" 或 "name" 屬性(根據(jù)瀏覽器),所以我們同時(shí)向 map 元素添加了 "id" 和 "name" 屬性。</p>
a.矩形:必須使用四個(gè)數(shù)字,前兩個(gè)數(shù)字為左上角座標(biāo),后兩個(gè)數(shù)字
為右下角座標(biāo)
b.圓形:必須使用三個(gè)數(shù)字,前兩個(gè)數(shù)字為圓心的座標(biāo),最后一個(gè)數(shù)
字為半徑長(zhǎng)度
c.任意圖形(多邊形):將圖形之每一轉(zhuǎn)折點(diǎn)座標(biāo)依序填入
例:<area shape=poly coords=442,40,485,40,340,94 href="URL">
</body>
</html>