本帖最后由 anbs01 于 2010-01-07 17:35:37 编辑

解决方案 »

  1.   


    <img id="aaa" width="200" height="200"/><img width="50" height="50" big="http://avatar.profile.csdn.net/F/1/1/2_chen_wen_xiu.jpg" src="http://avatar.profile.csdn.net/F/1/1/2_chen_wen_xiu.jpg" onclick="document.getElementById('aaa').src=this.getAttribute('big')"/> 
    <img width="50" height="50" big="http://avatar.profile.csdn.net/2/8/8/2_frankrenping.jpg" src="http://avatar.profile.csdn.net/2/8/8/2_frankrenping.jpg" onclick="document.getElementById('aaa').src=this.getAttribute('big')" /> 
    <img width="50" big="http://avatar.profile.csdn.net/6/8/3/2_wxg22526451.jpg" height="50" src="http://avatar.profile.csdn.net/6/8/3/2_wxg22526451.jpg" onclick="document.getElementById('aaa').src=this.getAttribute('big')" /> 
      

  2.   

    如果大图就是原图的话,可以去掉big属性.
    onclick=document.getElementById('aaa').src=this.src" 
      

  3.   

    var img="<img src="+this.src+">";
    document.getElementById("divId").innerHTML=img;
      

  4.   

    http://topic.csdn.net/u/20090421/11/2daa637d-c13c-409e-b742-dac30daa06a0.html1楼和3楼
      

  5.   

    你看看这个行不:
    $("a.preview").toggle(function(e){
    this.t = this.title;
    this.title = "";
    var c = (this.t != "") ? "<br/>" + this.t : "";
    $("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");  
    $("#preview")
    .css("top",(e.pageY - xOffset) + "px")
    .css("left",(e.pageX + yOffset) + "px")
    .fadeIn("fast");
        },
    function(){
    this.title = this.t;
    $("#preview").remove();
        });
    $("a.preview").mousemove(function(e){
    $("#preview")
    .css("top",(e.pageY - xOffset) + "px")
    .css("left",(e.pageX + yOffset) + "px");
    });