<div class="codetitle"> <span><a style="CURSOR: pointer" data="75143" class="copybut" id="copybut75143" onclick="doCopy('code75143')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code75143"> <br>以下为程序代码:> <br> <br><script type="text/javascript" src="http://www.w3school.com.cn/jquery/jquery.js"></script> <br><script type="text/javascript"> <BR>$(function() { <BR>$(".v").mouseover(function() { <BR>var x = $("<div class='vs'></script> </div>"); <br>x.appendTo($('body')); <br>x.css({ <br>width : $(this).width() - 6, <br>height : $(this).height() - 6, <br>left : $(this).offset().left, <br>top : $(this).offset().top <br>}); <br>$($.browser.msie ? this : x).mouseout(function(){ <br>x.remove(); <br>}); <br>}); <br>}); <br> <br><style> <BR>.vs {z-index:1000;position:absolute;border:3px solid red;} <BR></style> <br> <br> <br><a href="#"><img src="http://img2.bdstatic.com/img/image/774730e0cf3d7ca7bcb7a7b223ebc096b63f624a89b.jpg" border="0" class="v" alt="JQuery实现鼠标移动到图片上显示边框效果_jquery" ></a> <br><a href="#"><img src="http://img2.bdstatic.com/img/image/774730e0cf3d7ca7bcb7a7b223ebc096b63f624a89b.jpg" border="0" alt="JQuery实现鼠标移动到图片上显示边框效果_jquery" ></a> <br><a href="#"><img src="http://img2.bdstatic.com/img/image/774730e0cf3d7ca7bcb7a7b223ebc096b63f624a89b.jpg" border="0" class="v" alt="JQuery实现鼠标移动到图片上显示边框效果_jquery" ></a> <br> <br>