求网页两侧加FALSH广告的代码

来源:百度知道 编辑:UC知道 时间:2024/05/15 14:52:16
详细一点

调用JS
<script language=JavaScript src="js/ad.js"></script>路径自己设置

JS代码如下
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