JavaScript DHTML/Javascript Collections/areas
Версия от 09:59, 26 мая 2010; (обсуждение)
"areas" Example
<html>
<head>
<script language="JavaScript">
function function1() {
var m = document.all.myMap.areas.length;
alert("There are "+m+" areas within the map "myMap"");
}
</script>
</head>
<body onload="function1();">
<p>
<img src="http://www.wbex.ru/style/logo.png"
alt=""
width="200"
height="100"
usemap="#myMap">
<map name="myMap">
<area id="area1"
shape="rect"
coords="0, 0, 100, 50"
href="http://www.wbex.ru"
onClick="return false">
<area id="area2"
shape="rect"
coords = "100, 0, 200, 50"
href="http://www.wbex.ru"
onClick="return false">
<area id="area3"
shape="rect"
coords = "0, 50, 100, 100"
href="http://www.wbex.ru"
onClick="return false">
<area id="area4"
shape="rect"
coords = "0, 0, 0, 0"
href="http://www.wbex.ru"
onClick="return false">
</map>
</p>
</body>
</html>