此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【qihjn】截止到2008-07-05 18:33:46的历史汇总数据(不包括此帖):
发帖的总数量:16                       发帖的总分数:270                      
结贴的总数量:10                       结贴的总分数:170                      
无满意结贴数:1                        无满意结贴分:10                       
未结的帖子数:6                        未结的总分数:100                      
结贴的百分比:62.50 %               结分的百分比:62.96 %                  
无满意结贴率:10.00 %               无满意结分率:5.88  %                  
楼主加油

解决方案 »

  1.   

    你可以新建一个image 对象,然后src为要取宽高的IMG的src,再通过获取这个新的image对象的宽高来得到。
      

  2.   

    <script>
    function getSize(img)
    {
    if(typeof(img)!='object')
    img=document.getElementById(img);
    if(img==null)
    return;
    var image=document.createElement("img");
    image.onload=function (){
    var width=this.width;
    var height=this.height;
                    alert("width:"+width+" height:"+height)
    };
    image.src=img.src;
    }
    </script>
    <img src="http://profile.csdn.net/dh20156/picture/2.jpg" width="1" height="1" onload="getSize(this)">