Quias dos 3 codigos é melhor para Banner floater ?
1)<html>
<head>
<title>Criar uma DIV igual a uma janela Popup</title>
<style>
#pop{
display:none;
position:absolute;
top:50%;left:50%;
margin-left:-150px;
margin-top:-100px;
padding:10px;
width:300px;
height:200px;
border:1px solid #d0d0d0
}
</style>
</head>
<body>
<div id="pop">
<a href="#" onclick="document.getElementById('pop').style.display='none';">[Fechar]</a>
<br />
Agora coloque o estilo dessa div.
</div>
<a href="#" onclick="document.getElementById('pop').style.display='block';">Mostra</a>
</body>
</html>
<body>
<body onload="document.getElementById('pop').style.display='block';">
</body>
2)
<script language="JavaScript"> setTimeout("document.all.layer_destaque.style.display='none'", 10000)</script>
<!-- Floater --><div id="layer_destaque" style="position:absolute; left:128px; top:109px; width:300px; height:300px; z-index:5;"> <div align="right"> <a href="#" onClick="document.all.layer_destaque.style.display='none'"><img src="images/fechar.png" alt="Clique para fechar" border="0" /></a> <script type="text/javascript">AC_FL_RunContent( 'codebase','[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0,width,300,height,300,src,flash/floater,quality,high,pluginspage,http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash,wmode,transparent,movie,flash/floater](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0,width,300,height,300,src,flash/floater,quality,high,pluginspage,http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash,wmode,transparent,movie,flash/floater)' ); //end AC code</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0) width="300" height="300"> <param name="movie" value="flash/floater.swf" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <embed src="flash/floater.swf" width="300" height="300" quality="high" pluginspage="[http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"](http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash) type="application/x-shockwave-flash" wmode="transparent"></embed> </object></noscript> </div></div><!-- Floater -->
3)
function findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms*[n];*
* for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers**.document);*
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function ExibeEscondeLayer() { //v6.0
var i,p,v,obj,args=ExibeEscondeLayer.arguments;
* for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args**))!=null) { v=args[i+2];*
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
E o seguinte código HTML:
*<div id="Layer1" style="position:absolute; left:161px; top:12px; width:540px; height:240px; z-index:1; background-color: #B7C5D4; layer-background-color: #B7C5D4; border: 1px solid #006699">*
*<a onclick="ExibeEscondeLayer('Layer1','','hide');return false" href="#">Fechar</a>*
*</div>*Discussão (5)
Carregando comentários...