日期:2014-05-17  浏览次数:20663 次

html里,如何去掉点击map里area的边框

例如:

<html>
<body>
<img src="pic.jpg" width="134" height="115" border="0" usemap="#Map" hidefocus="true" />
<map name="Map" id="Map">
<area shape="poly" coords="44,44,61,40,77,45,95,55,105,66,57,76,16,62,32,58,27,55,40,50" href="link_to.html"  />
</map>
</body>
</html>
?

★第一种方法是:在<img> 标签中加入 hidefocus="true"

<img src="pic.jpg" width="134" height="115" border="0" usemap="#Map" hidefocus="true" />
?

★第二种方法是:在需要去掉边框的<area> 标签中加入 onfocus="blur(this);" (如果area区域较多,则每个都要加,那就显得有些麻烦了,可以用第一种方法)

<area shape="poly" coords="44,44,61,40,77,45,95,55,105,66,57,76,16,62,32,58,27,55,40,50" href="link_to.html" onfocus="blur(this);" />
?