<html>
<head></head>
<body>
<img src="2.jpg" onmouseover="this.style.border='10px solid black'" onmouseout="this.style.border=''"/>
</body>
</html>
<head></head>
<body>
<img src="2.jpg" onmouseover="this.style.border='10px solid black'" onmouseout="this.style.border=''"/>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图片动态边框</title>
</head>
<style type="text/css">
img:hover{ border:1px #000000 solid;}
</style>
<body>
<img src="Img/00.gif" border="0" />
</body>
</html>
<style type="text/css">
img:hover{ ..//可以自己定义边框样式}
</style>
如果少的话就一张一张加也可以,不过如果图片经常有变动的话还是建议用CSS