我想创建几个区域的图像地图。
<img src="map.png" alt="map" usemap="#planetmap" />
<map name="planetmap" id="map">
<area onMouseover="showtext('New York!')"
shape="circle"
coords="90,58,3"
href="#" alt="NY"/>
</map>我希望文字显示时,通过形状(像一个提示)。你能告诉我问题出在哪里吗?我找到了css / javascript相结合的解决方案,但我更喜欢最简单的解决方案。
谢谢。
Juraj
发布于 2012-04-20 19:39:36
尝尝这个
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Map Document</title>
<script type="text/javascript">
function showtext(text){
alert(text);
}
</script>
</head>
<body>
<img src="map.png" width="145" height="126" alt="Map"
usemap="#planetmap" />
<map name="planetmap" id="map">
<area shape="circle"
coords="90,58,3"
alt="Venus"
href="#"
onmouseover="showtext('New York!')" />
</map>
</body>
</html>https://stackoverflow.com/questions/10243606
复制相似问题