对联广告jsflash激活_广告代码
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了对联广告jsflash激活_广告代码,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2063字,纯文字阅读大概需要3分钟。
内容图文
ad.jsvar delta=0.08
var collection;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('
var newItem = {};
newItem.object = document.getElementById(id);
newItem.x = x;
newItem.y = y;
this.items[this.items.length] = newItem;
}
this.play = function()
{
collection = this.items
setInterval('play()',10);
}
}
function play()
{
for(var i=0;i<collection.length;i++)
{
var followObj = collection[i].object;
var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
var followObj_y = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);
if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
followObj.style.left=followObj.offsetLeft+dx;
}
if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
followObj.style.top=followObj.offsetTop+dy;
}
followObj.style.display = '';
}
}
var theFloaters = new floaters();
//右面
theFloaters.addItem('followDiv1','document.body.clientWidth-106',80,'');
//左面
theFloaters.addItem('followDiv2',6,80,'');
theFloaters.play();
//图片格式调用方法
//
内容总结
以上是互联网集市为您收集整理的对联广告jsflash激活_广告代码全部内容,希望文章能够帮你解决对联广告jsflash激活_广告代码所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。