主题:[讨论]请教下:如何让这段代码实现浮动效果
单位网站中我加了个对联广告,但不能实现跟随窗口的浮动效果,另外如何在后台不显示,请教高手解答。
代码如下:
<SCRIPT language=JavaScript event=FSCommand() for=dl>
duilian2.style.visibility='hidden';
duilian3.style.visibility='hidden';
</SCRIPT>
<SCRIPT language=JavaScript>
function winload()
{
duilian2.style.top=20;
duilian2.style.left=5;
duilian3.style.top=20;
duilian3.style.right=5;
}
if(screen.width>800){
{
document.write("<div id=duilian2 style='position: absolute;visibility:visible;z-index:1'><EMBED src='left.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>"
+"<div id=duilian3 style='position: absolute;visibility:visible;z-index:1'><EMBED src='right.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>");
}
winload() ;
}
</SCRIPT>
代码如下:
<SCRIPT language=JavaScript event=FSCommand() for=dl>
duilian2.style.visibility='hidden';
duilian3.style.visibility='hidden';
</SCRIPT>
<SCRIPT language=JavaScript>
function winload()
{
duilian2.style.top=20;
duilian2.style.left=5;
duilian3.style.top=20;
duilian3.style.right=5;
}
if(screen.width>800){
{
document.write("<div id=duilian2 style='position: absolute;visibility:visible;z-index:1'><EMBED src='left.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>"
+"<div id=duilian3 style='position: absolute;visibility:visible;z-index:1'><EMBED src='right.swf' quality=high WIDTH=100 HEIGHT=300 TYPE='application/x-shockwave-flash' id=dl></EMBED></div>");
}
winload() ;
}
</SCRIPT>