返回列表 发帖

[Code] 页面漂浮广告代码

<script>
function turnoff(obj){
document.getelementbyid(obj).style.display="none";
}
</script>
  
<div id="ad" style="position:absolute;z-index:10">
<a href="#">点击关闭</a><br>
<a href="http://www.sfsfsfsf.com/about.asp?id=49" target="_blank"><img src="http://www.sfsfsfsf.com/danbao.jpg" border="0">
</a></div>
<div id="ad" style="position:absolute;z-index:11">
<script>
var x = 50,y = 60
var xin = true, yin = true
var step = 1
var delay = 10
var obj=document.getelementbyid("ad")
function floatad() {
var l=t=0
var r= document.body.clientwidth-obj.offsetwidth
var b = document.body.clientheight-obj.offsetheight
obj.style.left = x + document.body.scrollleft
obj.style.top = y + document.body.scrolltop
x = x + step*(xin?1:-1)
if (x < l) { xin = true; x = l}
if (x > r){ xin = false; x = r}
y = y + step*(yin?1:-1)
if (y < t) { yin = true; y = t }
if (y > b) { yin = false; y = b }
}
var itl= setinterval("floatad()", delay)
obj.onmouseover=function(){clearinterval(itl)}
obj.onmouseout=function(){itl=setinterval("floatad()", delay)}
</script>
</div>
欢迎光临:逐梦论坛

欢迎光临:逐梦论坛

TOP

dddddddddddddddddddddddddddd

TOP

谢谢啦,很有用!

TOP

挺好啊挺好

TOP

说的好啊!我在bbs打滚这么多年,所谓阅人无数,就算没有见过猪走路,也总明白猪肉是啥味道的

TOP

谢谢楼主,真是太好了

TOP

支持你加分

TOP

你加油吧!!!

TOP

返回列表

Powered by Discuz! 7.2   论坛QQ群:逐梦论坛群

© 2001-2021 Comsenz Inc. 鲁公网安备 37120302000001号