[注意]漂浮的广告代码

2008-02-22 01:42:30来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

<div id="img" style="position:absolute;; left: 27px; top: 1115px">
<a href="http://www.jn001.net/"; target="_blank"><img src="/info/upimg/allimg/080222/0949550.jpg" width="88" height="31" border="0" alt="广告服务!"></a> </div>
<script language="javascript">
<!-- Begin
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos document.body.scrollLeft;
img.style.top = yPos document.body.scrollTop;
if (yon) {
yPos = yPos step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
function start() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
start();
// End -->
</script>
<span id="superball"></span>

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:[推荐]图片全屏漂浮代码

下一篇:[注意]页面的左右下脚始终固定不动的图片广告代码 (推荐)