Как изменить атрибуты тэгов map, area?
Как еще можно изменить атрибуты тэгов map, area?
Например, title? Можно ли обратиться к area в цикле, как к дочерним тэгам map?
<html>
<body>
<head>
<script>
function Change()
{
document.getElementById('id1').title='new1';
document.getElementsByName('name1').item(0).title='new2';
document.getElementsByName('name2[]').item(0).title='new3';
}
</script>
</head>
<map name="map1">
<area shape="RECT" coords="12,8,92,109" href="#" title="1" id='id1' />
<area shape="RECT" coords="95,9,175,58" href="#" title="2" name = name1 />
<area shape="RECT" coords="92,62,176,107" href="#" title="3" name = name2[] />
</map>
<img src="map.jpg" usemap="#map1" border="0" />
<input type=button value="Change title">
</body>
</html>
Источник: Stack Overflow на русском