风云小站 » 『 求助专区 』 » 如何在网站主页插入浮动的广告啊  多谢beckey和月老大哥
本页主题: 如何在网站主页插入浮动的广告啊  多谢beckey和月老大哥 打印 | 加为IE收藏 | 复制链接 | 收藏主题 | 上一主题 | 下一主题

pioneer
发动一场新时期的全民破解运动
级别: 风云精英


精华: 0
发帖: 947
威望: 1997 点
风云币: 151901 元
专家分: 159 分
在线时间:467(小时)
注册时间:2006-10-06
最后登录:2008-04-29

 如何在网站主页插入浮动的广告啊  多谢beckey和月老大哥

顶端 Posted: 2007-10-01 13:54 | [楼 主]
月老
黄鱼党|大家好才是真的好!
级别: 荣誉会员


精华: 0
发帖: 2968
威望: 1433 点
风云币: 3075 元
专家分: 3 分
论坛群: ☆黄鱼党☆
在线时间:597(小时)
注册时间:2006-11-01
最后登录:2024-01-03

 

<style type="text/css">
<!--
body {
background-color: #666699;
}
-->
</style><div id="img" style="position:absolute;">
  <a href="http://xxxx.com" target="_blank"><img src="xxxx.gif" border="0"> 
</div>

<SCRIPT LANGUAGE="JavaScript">
<!--
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 www_helpor_net() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
www_helpor_net();
</script>
虽然我已英年早肥,但我仍然很穷!!!黄鱼党|月老
欢迎大家光临我爱天使技术论坛!
顶端 Posted: 2007-10-01 14:05 | 1 楼
帖子浏览记录 版块浏览记录
风云小站 » 『 求助专区 』
感谢,曾经的版主
Total 0.013851(s) query 9, Time now is:09-29 20:38, Gzip enabled 渝ICP备20004412号-1

Powered by PHPWind v6.3.2 Certificate Code © 2003-07 PHPWind.com Corporation
Skin by Chen Bo