日期:2014-05-16  浏览次数:20401 次

怎么获取多张图片的宽和高,并且显示啊
我百度到的一条代码
function ReSizePic(ThisPic){
  var RePicWidth = 50; 
  var TrueWidth = ThisPic.width;  
  var TrueHeight = ThisPic.height;  
  var Multiple = TrueWidth / RePicWidth;
ThisPic.height = TrueHeight / Multiple;
alert(ThisPic.height);
}
这段代码怎么获取多张图片的,现在只能获取一张图片的,麻烦哪位大神帮忙修改下

------解决方案--------------------
var images=document.images;
for(var i=0;i<images.length;i++){
......
}
试试