图片加载

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script>
function gid(id){return document.getElementById?document.getElementById(id):null;}
function   checkImagestate( _spanid, imgobj ,nShowWith)    
{       
    var _objspan = gid(_spanid);   
   if ( event.srcElement.readyState == "complete")
   {     
            imgobj.width=nShowWith;  
            _objspan.style.display='none'
            imgobj.style.display = 'block'; 
   }
   else
   {
        _objspan.innerHTML = "<font style=\"color:#FFD5B2\">图片加载失败!</font>"
   }  

</script>
<body>
<div style="border:1px solid #ccc;height:82px;heigth:68px;margin:2px;">
<span style="text-align:center" id=spanworking_tag_imageindex_tag>正在装载图片...</span>
<img src="http://192.168.1.10:806/ad_119h/gq13.gif" border="0" align=absmiddle style=" display:none" onload="checkImagestate('spanworking_tag_imageindex_tag',this,82);" /></li>
</a>
</div>

</body>
</html>

原文地址:https://www.cnblogs.com/itecho/p/1307071.html