大家都没碰到这种问题吗?
这种问题隐藏性比较高不好测试,因为一旦你刷新了,这个问题也就没了.
但是,其它电脑第一次进的时候就出现问题了,但是也是一刷新也没了.,
郁闷的很!

解决方案 »

  1.   

    第一次是加载,刷新是直接从缓存里取值了
      

  2.   

    <img src = 'image/xxx.jpg' onLoad='showSize()'>
    <script>
    function showSize()
    {
      var img = event.srcElement;
      alert('width = '+img.width+'\n\r'+'height = '+img.height);
    }
    </script> 
    图片是要加载,尚未加载是无法获得它的长度!!
    onload事件: 
    Fires immediately after the browser loads the object.
    属性 readyState :Retrieves a value that indicates the current state of the object. 

    loading ,Object is loading its data. 
    loaded ,Object has finished loading its data. 
    interactive ,User can interact with the object even though it is not fully loaded. 
    complete ,Object is completely initialized. http://community.csdn.net/Expert/topic/4183/4183638.xml?temp=.3994715