<script type="text/javascript"> 
function c(d){ 
var b=document.getElementById(""+d+""); 
alert(b.getAttribute("test")); 

function showimg(){ 
setTimeout("showother()",5000); 
} function showother(){ document.getElementById("loading").style.display="none";
document.getElementById("bb").style.display="block";
}
</script> 
<div id="loading" ><img src="images/bg.jpg"   onload="showimg();"/></div>
<div align="center"  style="display:none" id="bb">
 
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="765" height="585">
      <param name="movie" value="images/main.swf" />
      <param name="quality" value="high" />
      <embed src="images/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="765" height="585"></embed>
    </object></div>

解决方案 »

  1.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>xx公司</title>
    </head><body>
    <script language="javascript">
    function showimg(){ 
    setTimeout("showother()", 5000); 
    } function showother(){ 
    document.getElementById("b").style.display=""; }
    </script><div id="loading" ><img src="images/0a420f118068dbd5a6ef3f5f.jpg" onload="showimg()"  /></div>
    <!--目的要显示bg.jpg5秒,然后显示下面的flash.--><div id="b" align="center" style="display:none">
     
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="765" height="585">
          <param name="movie" value="images/main.swf" />
          <param name="quality" value="high" />
          <embed src="images/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="765" height="585"></embed>
        </object>
    </div></body></html>
      

  2.   

    也能达到你要的效果呀!
    你的效果无非也就是先显示图片,在显示网页的内容!
    你默认的display=none,图片的display='' 用 setTimeout() 设定 图片 与其他内容的显示问题!你要 先加载 图片,图片加载完了暂停5秒,然后图片的display变为none;然后继续加载其他的东西?
      

  3.   

    接点分<script>
    var a=100
    var timerfunction hidde(){
    if(a!=0)
    {document.getElementById("loading").style.filter = "Alpha(opacity="+a+")"; a=a-20
    timer=setTimeout("hidde()",1000)}
    else
    {
    alert("a")
    clearTimeout(timer)
    document.body.removeChild(document.getElementById("loading"))
    document.getElementById("b").style.display=""
    }
    }function window.onload(){
    hidde()}
    </script>
    <body>
    <div id="loading" ><img src="images/bg.jpg"  /></div>
    <!--目的要显示bg.jpg5秒,然后显示下面的flash.--><div id="b" align="center" style="display:none;">
     
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="765" height="585">
          <param name="movie" value="images/main.swf" />
          <param name="quality" value="high" />
          <embed src="images/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="765" height="585"></embed>
        </object></div></body></html>
      

  4.   

    2楼的这段代码是多余的
    function c(d){ 
    var b=document.getElementById(""+d+""); 
    alert(b.getAttribute("test")); 

    3楼的
    document.getElementById("loading").style.display="none"; 
    这句代码不能省,否则图片合其它内容会同时出现4楼的,你的思路很正确