中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Area coords 屬性

Area 對(duì)象參考手冊(cè) Area 對(duì)象

定義和用法

coords 屬性可設(shè)置或者返回某個(gè)區(qū)域的 coords 屬性值。

coords 屬性描述了圖像映射中某個(gè)可點(diǎn)擊區(qū)域的坐標(biāo)。

提示:區(qū)域的左上角坐標(biāo)0,0。

語(yǔ)法

areaObject.coords=value

coords 輸出可以是以下值:

描述
x1,y1,x2,y2 如果 shape 屬性設(shè)置為"rect",它 指定的左上角和右下角的矩形坐標(biāo)
x,y,radius 如果 shape 屬性設(shè)置為"circle",它 指定圓心坐標(biāo)和半徑
x1,y1,x2,y2,..,xn,yn 如果 shape 屬性設(shè)置為 "poly",它 指定多邊形的的坐標(biāo)。如果第一個(gè)和最后一個(gè) 坐標(biāo)是不一樣的,瀏覽器必須加上一個(gè)閉合多邊形的坐標(biāo)

瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主要瀏覽器都支持coords 屬性


實(shí)例

實(shí)例

返回圖像映射中 "Venus" 區(qū)域的的坐標(biāo):

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>小白教程(json.cn)</title>
</head>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">
<map name="planetmap">
<area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>
<p>金星的坐標(biāo):
<script>
document.write(document.getElementById("venus").coords);
</script>
</p>

</body>
</html>

以上實(shí)例輸出結(jié)果:

金星的坐標(biāo): 124,58,8

運(yùn)行代碼 ?

Area 對(duì)象參考手冊(cè) Area 對(duì)象其他擴(kuò)展