本页内容是《浮动图片》同时我们还提供济宁地区的网站建设,百度,雅虎,google的推广,点金,商友,等营销软件
请输入关键字:

标题搜索 内容搜索  

你现在所在的位置->首页->javascript->浮动图片

浮动图片

时间:[2005-5-23 15:36:33]     作者:网上

----------------------articlepf.js--------------------------


var delta=0.15
var collection;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
  {
document.write('
height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'
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 {
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('followDiv2',12,130,'
href=http://ads.1stchina.com/getlink.php3?member=051&url=http://www.1stchina.com/  

target=_blank>

【声明】本站刊载的《浮动图片》一文如果有侵害你权益的情况,请联系我们。我们将及时采取措施。
QQ:44637339 Email:just6@163.com Tel:13355163107 Lining studios

友情链接

本页内容是《浮动图片》 返回顶部
© 2001-2024 Lining studios 济宁速创科技有限公司, All Rights Reserved
 Processed Time:62.500ms
中华人民共和国信息产业部网站备案号: 鲁ICP备09103015号-1