一个简单实用的单边对联广告

<SCRIPT LANGUAGE="JavaScript">
<!--对联广告条-->
var imgheight
var imgleft
document.ns = navigator.appName == "Netscape"
window.screen.width>800 ? imgheight=500:imgheight=100
window.screen.width>800 ? imgleft=15:imgleft=122
function myload()
{
if (navigator.appName == "Netscape")
{document.myleft.pageY=pageYOffset+window.innerHeight-imgheight;
document.myleft.pageX=imgleft;
leftmove();
}
else
{
myleft.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight;
myleft.style.left=imgleft;
leftmove();
}
}
function leftmove()
{
if(document.ns)
{
document.myleft.top=pageYOffset+window.innerHeight-imgheight
document.myleft.left=imgleft;
setTimeout("leftmove();",80)
}
else
{
myleft.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight;
myleft.style.left=imgleft;
setTimeout("leftmove();",80)
}
}


if (navigator.appName == "Netscape")
{
document.write("<layer id=myleft top=300 width=80 height=88><EMBED src='js/1.swf' quality=high WIDTH=80 HEIGHT=80 TYPE='application/x-shockwave-flash' id=changhongout wmode='transparent'></EMBED></layer>");
myload()}
else
{
document.write("<div id=myleft style='position: absolute;width:80;top:150;left:5;visibility: visible;z-index: 1'><EMBED src='js/1.swf' quality=high WIDTH=80 HEIGHT=80 TYPE='application/x-shockwave-flash' id=changhongout wmode='transparent'></EMBED></div>");
myload()
}


<!--对联广告条-->
</SCRIPT>

posted @ 2006-10-07 13:52  ddr888  阅读(1224)  评论(0编辑  收藏  举报