日期:2014-05-16 浏览次数:20349 次
function DrawImg(boxWidth , boxHeight){ var image = new Image(); image.src = $('#myimg').attr('src'); image.onload = function(){ //判断代码写这里 if(this.width > boxWidth){ }else{ } if(this.height > boxHeight){ }else{ } } }