如图 今天我做的是利用JQuery模拟这个效果 源码如下 复制代码 代码如下: <BR>//假设data是从数据库取到的数据 <BR>var data = {"images/1_small.jpg":["images/1_big.jpg","内衣少女","主演:文咏珊,郑丽欣"],"images/2_small.jpg":["images/2_big.jpg","爱情陷阱","主演:金正勋,蔡琳"],"images/3_small.jpg":["images/3_big.jpg","源代码","主演:贾斯丁,克里斯丁娜"]}; <BR>$(function(){ <BR>$.each(data,function(key,value){ <BR>var smallimg = $("<img src='" + key + "' alt="用JQuery模仿淘宝的图片放大镜显示效果_jquery" >"); <BR>smallimg.attr("bigmappath",value[0]); <BR>smallimg.attr("personname",value[1]); <BR>smallimg.attr("personheight",value[2]); <BR>smallimg.mouseover(function(e){ <BR>$("#detailImg").attr("src",$(this).attr("bigmappath")); <BR>$("#detailHeight").text($(this).attr("personheight")); <BR>$("#detailName").text($(this).attr("personname")); <BR>$("#details").css("top",e.pageY).css("left",e.pageX).css("display",""); <BR>}); <BR>$("body").append(smallimg); <BR>}); <BR>}); <BR> 鼠标移动到小图上面效果图如下