<script>
function imgLoad(img, w, h) { if (img.offsetWidth > w) { var h1 = Math.ceil(img.offsetHeight * w / img.offsetWidth); if (h1 > h) { w = h * w / h1; h1 = h; } img.style.width = w + 'px'; img.style.height = h1 + 'px'; } }
</script><img onload="imgLoad(this,80,200)" alt="五台山菩提轩" src="xxxxxx.gif">
function imgLoad(img, w, h) { if (img.offsetWidth > w) { var h1 = Math.ceil(img.offsetHeight * w / img.offsetWidth); if (h1 > h) { w = h * w / h1; h1 = h; } img.style.width = w + 'px'; img.style.height = h1 + 'px'; } }
</script><img onload="imgLoad(this,80,200)" alt="五台山菩提轩" src="xxxxxx.gif">
if(图片.width()>80 && 图片.height()<=200){
图片.width()=80;}elseif(图片.width()<=80 && 图片.height()>200){图片.height()=200;}elseif(图片.width()>80 && 图片.height()>200){图片.height()=200;图片.width()=80;}else{不改变}