對聯浮動廣告不會動的解決方法。
2005/7/24 10:06:00
[dvnews_page]
var delta=0.015;
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-100',0,'<a onClick="closeBanner();" href=http://www.71600.com target=_blank><img src=ad/right.gif width=100 height=554 border=0></a><br><br><img src=ad/close.gif onClick="closeBanner();">');
theFloaters.addItem('followDiv2',0,0,'<a onClick="closeBanner();" href=http://www.71600.com target=_blank><img src=ad/ad_ad.gif width=100 height=400 border=0 ></a><br><br><img src=ad/close.gif onClick="closeBanner();">');
theFloaters.play();
把上面的代碼另存為一個JS文件,然后在想實現此效果的頁面用 調用即可,*代表你另存的文件名!注意修改廣告圖片地址和連接地址!
解決方法:
去掉這行
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
返回列表
返回首頁
主站蜘蛛池模板:
欧美同性videos视频|
里番库全彩本子彩色h可知子|
好硬好爽好湿好深视频|
久久亚洲私人国产精品|
韩国理论福利片午夜|
在线观看精品视频网站www|
亚洲av永久无码精品古装片|
特黄特色大片免费播放器999|
四虎在线永久精品高清|
香蕉视频好色先生|
国产精品久久久久久久久久久不卡
|
蜜桃成熟时2005|
国产欧美视频在线观看|
67194熟妇在线观看线路1|
天堂久久久久va久久久久|
三上悠亚大战黑人在线观看|
日本一卡2卡3卡4卡三卡视频
|
国产精品久久国产精麻豆99网站
|
欧美黑人粗大xxxxbbbb|
免费国产精品视频|
美国免费高清一级毛片|
国产三级放荡的护士|
高清在线一区二区|
国产极品粉嫩泬免费观看|
269tv四季直播苹果下载|
在线免费观看毛片网站|
eeuss影院机在线播放|
小猪视频免费网|
中文字幕天天躁日日躁狠狠躁免费|
日本理论片午夜论片|
久久综合香蕉国产蜜臀AV|
欧美va亚洲va在线观看蝴蝶网|
亚洲成a人片在线不卡|
洗澡被王总干好舒服小说|
国产午夜成人AV在线播放|
欧美色图在线观看|
国产白浆视频在线播放|
www卡一卡二卡三|
性欧美18一19sex性高清播放|
中文字幕免费在线看线人|
无码精品日韩中文字幕|