怎么做网页对联广告?步骤尽量详细。让浮动广告停止的代码是?

来源:百度知道 编辑:UC知道 时间:2024/07/03 03:54:39

<script type="text/javascript">
//注意要把网页头部 下面1行去掉
// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
//否则不会随着滚动浮动

var delta=0.015
var collection;
function floaters()
{
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('<div id='+id+' style="z-index: 0; 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;
}