我得到了一个jQuery函数,它可以缩放图片,因此最大的测量值是350 no,而不管原始大小如何。
jQuery:
function Scale(){
var img = new Image();
img.onload = function () {
alert('Orignal width:'+img.width+', height:'+img.height);
var width, height;
if (img.width > img.height) {
width = (img.width >