越简单越好!

javascript 浮动代码

发表于 2008-09-09 09:54 | 1072次阅读 0次点赞   JavaScript

<div id='myright' style='position: absolute;width:100;visibility: visible;z-index: 1'>
<a href="http://www.maotg.com">老猫团购网</a>
<a href="http://www.ilaopo.net">爱老婆女性论坛</a>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.ns = navigator.appName == "Microsoft Internet Explorer"
var bdy = (document.documentElement && document.documentElement.clientWidth)?document.documentElement:document.body;

window.screen.width>800 ? imgheight_close=130:imgheight_close=130
function myload()
{
myright.style.top=bdy.scrollTop+bdy.offsetHeight-imgheight_close;
myright.style.left=bdy.offsetWidth-130;
mymove();
}
function mymove()
{
myright.style.top=bdy.scrollTop+bdy.offsetHeight-imgheight_close;
myright.style.left=bdy.scrollLeft+bdy.offsetWidth-130;
setTimeout("mymove();",50)
}
myload()
//-->
</SCRIPT>

返回顶部 ^