function getimg() { //obj = document.getElementById(‘my’); obj = document.all.pic; if(obj.readyState!=“complete”){ return false; } if(obj.offsetWidth > 500) { obj.width=500; } //alert(obj.offsetHeight); //alert(obj.offsetWidth); }

判断加载