高手请解释一下此对联广告代码(保证快速结贴)

本人想搞在网站上加一个对联广告,好不容易半天网上找了一个,但折腾半天都没搞明白。请高手解释一下,越详细越好!解释得好,将奖分!!<html><BODYleftmargin... 本人想搞在网站上加一个对联广告,好不容易半天网上找了一个,但折腾半天都没搞明白。请高手解释一下,越详细越好!解释得好,将奖分!!
<html>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script language=JavaScript >
var delta=0.08
var collection;
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()',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,'<EMBED src=http://www.soojs.com/upload/2007/8/3/01_duilian.swf quality=high WIDTH=100 HEIGHT=300 TYPE=application/x-shockwave-flash id=ad wmode=opaque></EMBED>');
//左面
theFloaters.addItem('followDiv2',6,80,'<EMBED src=http://www.soojs.com/upload/2007/8/3/01_duilian.swf quality=high WIDTH=100 HEIGHT=300 TYPE=application/x-shockwave-flash id=ad wmode=opaque></EMBED>');
theFloaters.play();

//图片格式调用方法
//<a href=http://www.makewing.com/lanren/ target=_blank><img src=images/ad_100x300.jpg border=0></a>

</script>
<table width="778" height="1500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4">
<tr>
<td> </td>
</tr>
</table>
</BODY></HTML>
展开
 我来答
714864161
2007-08-22 · 超过10用户采纳过TA的回答
知道答主
回答量:84
采纳率:0%
帮助的人:44.2万
展开全部
这是网页内放的代码:
<!--对联广告条-->
<SCRIPT FOR='EccoolAd' EVENT='fscommand()' LANGUAGE='JavaScript'>
AdLayer1.style.visibility='hidden';
AdLayer2.style.visibility='hidden';
</script>
<script src=EccoolAd.js></script>

flash中关闭按扭为close_btn
flash文件EccoolAdb.swf可以把下面JS中代码改为你的FLASH名
flash中关闭代码:
close_btn.onRelease = function() {
fscommand("quit");//作为HTML中EccoolAD对象的响应事件
}

这是JS代码
function initEcAd() {
document.all.AdLayer1.style.posTop = -200;
document.all.AdLayer1.style.visibility = 'visible'
document.all.AdLayer2.style.posTop = -200;
document.all.AdLayer2.style.visibility = 'visible'
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
function MoveLeftLayer(layerName) {
var x = 5;
var y = 340;
var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
function MoveRightLayer(layerName) {
var x = 5;
var y = 340;
var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posRight = x");
setTimeout("MoveRightLayer('AdLayer2');", 20);
}
document.write("<div id=AdLayer1 style='position: absolute;visibility:hidden;z-index:1'><EMBED src='EccoolAda.swf' quality=high WIDTH=100 HEIGHT=100 TYPE='application/x-shockwave-flash' id=EccoolAd></EMBED></div>"
+"<div id=AdLayer2 style='position: absolute;visibility:hidden;z-index:1'><EMBED src='EccoolAdb.swf' quality=high WIDTH=100 HEIGHT=100 TYPE='application/x-shockwave-flash' id=EccoolAd></EMBED></div>");
initEcAd()
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式