for(var i=0;i <3;i++) 

        var x = addToTd(i); 

function addToTd(i) 

    var td = document.getElementById("show"+i);   //得到td的id,分别为show0,show1,show2 
    var img = new Image(); 
    img.src = imageUrl; 
    img.id = img.src; 
    img.onload = function(){
       this.width = this.width/4
       this.height = this.height/4
    }
    if(img.readyState != "complete") return 0;    //没有加载完成的话,返回0.直到加载完成
    td.innerHTML = ""; 
    td.appendChild(img); 
    return 1;