浮动广告层中插入的是flash,在浮动广告上插入关闭层,不显示,怎么能显示关闭层?

解决方案 »

  1.   

    function closeDiv(){
    document.getElementById("leftDiv").style.display='none';
    document.getElementById("closeDiv").style.display='none';
    }
    function inix( ){
         advInitTop=advInitTop+document.getElementById("leftDiv").style.pixelTop;
     advcloseTop=advcloseTop+document.getElementById("closeDiv").style.pixelTop;    
    }
    function move(){
    document.getElementById("leftDiv").style.pixelTop=advInitTop+document.body.scrollTop;
    document.getElementById("closeDiv").style.pixelTop=advcloseTop+document.body.scrollTop;
    }
    window.onscroll=move
    </script>
    </head><body>
    <div id="leftDiv" style="position:absolute; width:121px; height:115px; z-index:1; left: 58px; top: 28px;">
      <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="120" height="450">
        <param name="movie" value="images/div2.swf"  />
        <param name="quality" value="high" />
    <param name="wmode" value="transparent" />//要加上这句话 才行    <embed src="images/div2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="120" height="450" style="overflow:hidden; z-index:1; "></embed>
      </object>
    </div>
      <div id="closeDiv"  style="position: absolute; width: 35px; height: 23px; z-index: 4; left: 148px; top: 42px;"><a href="javascript:closeDiv()" style=" color: red;text-decoration:none;">&nbsp;&nbsp;&nbsp;&nbsp;</a></div>
    <div>