如何控制上传的图片大小
function load_img(){
  var img =new Image();
  img.width=12;
  img.height=400;
       //document.animation.src='Public/Uploads/Products/1251796608.jpg';
        img.setAttribute('src', 'Public/Uploads/Products/1251796608.jpg'); 
 document.getElementById('show_pic').appendChild(img); //添加显示区域div
}这什么以上的代码无法控制图像大小 var img1=document.createElement("img1");
 img1.src=FilePath;
 img1.setAttribute('id', "get_size_img");
 temp_img.insertAdjacentElement("beforeend",img1);
用这个无法在   temp_img.insertAdjacentElement("beforeend",img1);之前得到图片的大小不明白该如何做了