javascript當中MapArea的用法
馬克- to-win:馬克 java社區(qū):防盜版實名手機尾號: 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>注釋:</b>img 元素中的 "usemap" 屬性引用 map 元素中的 "id" 或 "name" 屬性(根據(jù)瀏覽器),所以我們同時向 map 元素添加了 "id" 和 "name" 屬性。</p>
a.矩形:必須使用四個數(shù)字,前兩個數(shù)字為左上角座標,后兩個數(shù)字
為右下角座標
b.圓形:必須使用三個數(shù)字,前兩個數(shù)字為圓心的座標,最后一個數(shù)
字為半徑長度
c.任意圖形(多邊形):將圖形之每一轉(zhuǎn)折點座標依序填入
例:<area shape=poly coords=442,40,485,40,340,94 href="URL">
</body>
</html>