例一:http://www.w3school.com.cn/tiy/t.asp?f=jseg_imagemap
<img src="/i/eg_planets.jpg" border="0" usemap="#planetmap" alt="Planets" />
<map name="planetmap" id="planetmap">
<area shape="circle" coords="180,139,14"
onMouseOver="writeText('直到 20 世纪 60 年代,金星一直被认为是地球的孪生姐妹,因为金星是离我们最近的行星,同时还由于两者拥有很多共同的特征。')"
href ="/example/html/venus.html" target ="_blank" alt="Venus" />
<area shape="circle" coords="129,161,10"
onMouseOver="writeText('从地球上是很难研究水星的,这是由于它和太阳的距离总是很近。')"
href ="/example/html/mercur.html" target ="_blank" alt="Mercury" />
<area shape="rect" coords="0,0,110,260"
onMouseOver="writeText('太阳和类似木星这样的气态行星是到目前为止太阳系中最大的物体。')"
href ="/example/html/sun.html" target ="_blank" alt="Sun" />
</map>
例二:http://jwfpd.javaeye.com/blog/56468
<img src="/images/test.jpg" border="0" usemap="#Map1" name="flag"/>
<map name="Map1">
<area shape="rect" coords="0,0,386,27" style="cursor:hand" href="#" />
<area shape="rect" coords="194,28,362,65" style="cursor:hand" href="#" />
<area shape="rect" coords="197,165,362,199" style="cursor:hand" href="#"/>
<area shape="rect" coords="0,196,387,223" style="cursor:hand" href="#"/>
</map>
所以注意关键字:usemap,
shape="rect"和shape="circle" 矩形和圆
<img src="/i/eg_planets.jpg" border="0" usemap="#planetmap" alt="Planets" />
<map name="planetmap" id="planetmap">
<area shape="circle" coords="180,139,14"
onMouseOver="writeText('直到 20 世纪 60 年代,金星一直被认为是地球的孪生姐妹,因为金星是离我们最近的行星,同时还由于两者拥有很多共同的特征。')"
href ="/example/html/venus.html" target ="_blank" alt="Venus" />
<area shape="circle" coords="129,161,10"
onMouseOver="writeText('从地球上是很难研究水星的,这是由于它和太阳的距离总是很近。')"
href ="/example/html/mercur.html" target ="_blank" alt="Mercury" />
<area shape="rect" coords="0,0,110,260"
onMouseOver="writeText('太阳和类似木星这样的气态行星是到目前为止太阳系中最大的物体。')"
href ="/example/html/sun.html" target ="_blank" alt="Sun" />
</map>
例二:http://jwfpd.javaeye.com/blog/56468
<img src="/images/test.jpg" border="0" usemap="#Map1" name="flag"/>
<map name="Map1">
<area shape="rect" coords="0,0,386,27" style="cursor:hand" href="#" />
<area shape="rect" coords="194,28,362,65" style="cursor:hand" href="#" />
<area shape="rect" coords="197,165,362,199" style="cursor:hand" href="#"/>
<area shape="rect" coords="0,196,387,223" style="cursor:hand" href="#"/>
</map>
所以注意关键字:usemap,
shape="rect"和shape="circle" 矩形和圆
名称: ♪4C.ESL | .↗Evon
口号: 遇到新问题♪先要寻找一个方案乄而不是创造一个方案こ
mail: 联系我