对联滚动广告
来源:互联网 发布:mac air能玩lol吗 编辑:程序博客网 时间:2024/05/01 00:36
var delta=0.8;
var collection;
var closeB=false;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
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()',30);
}
}
function play()
{
if(screen.width<=800 || closeB)
{
for(var i=0;i<collection.length;i++)
{
collection[i].object.style.display = 'none';
}
return;
}
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 = '';
}
}
function closeBanner()
{
closeB=true;
return;
}
var theFloaters = new floaters();
//
theFloaters.addItem('followDiv1','document.body.clientWidth-96',120,'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="90" height="90"><param name="movie" wmode="transparent" value="http://www.dzwww.com/imagestemp/080118jngwj.swf"><param name="quality" value="high"><embed src="http://www.dzwww.com/imagestemp/080118jngwj.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="90" height="90"></embed></object><br><img src=http://www.dzwww.com/images/061207close.gif width="90" onClick="closeBanner();">');
theFloaters.addItem('followDiv2',6,120,'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="90" height="90"><param name="movie" wmode="transparent" value="http://www.dzwww.com/imagestemp/080122an.swf"><param name="quality" value="high"><embed src="http://www.dzwww.com/imagestemp/080122an.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="90" height="90"></embed></object><br><img src=http://www.dzwww.com/images/061207close.gif width="90" onClick="closeBanner();">');
theFloaters.play();
- 对联不滚动广告
- 对联滚动广告
- 滚动的对联广告
- 滚动的对联广告
- 对联广告不滚动
- 关于对联广告不滚动的解决方法
- 随屏幕滚动的对联广告
- js左右弹性滚动对联广告代码
- 对联广告
- 对联广告
- 对联广告
- 对联广告
- 对联广告
- 对联广告
- 对联广告
- 对联广告
- 对联广告
- 对联浮动广告代码不滚动的解决方法
- iframe嵌入网页的用法
- Tomcat的JSP编译时使用的JDK的版本
- 技术要有点文学色彩
- 对联不滚动广告
- 编码
- 对联滚动广告
- 如何从XML字符串获取DataSet
- 商业智能免费资料大全(截至2008-01-31)
- 在WIN2003下如何设置IIS(ASP)
- fork 函数
- PALM Kdic,Zdic之维基百科简易制作教程
- 2007年度中国十八个绝对经典的事件
- 最新中文行业垂直搜索引擎大全
- 全屏漂浮广告