蓝色经典的对联广告代码
<html>
<head>
<title>蓝色经典的对联广告代码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<table><tr><td height="1000"></tr></td></table>
<script language="JavaScript">
var delta=0.8;
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-106',80,'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="97" height="233"><param name="movie" value="/jscss/demoimg/200908/ad-02.swf"><param name="quality" value="high"><embed src="/jscss/demoimg/200908/ad-02.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="97" height="233"></embed></object><br><br><img src="/jscss/demoimg/200908/close.gif" onClick="closeBanner();">');
theFloaters.addItem('followDiv2',6,80,'<img src="/jscss/demoimg/dl.jpg" width="97" height="233"><br><br><img src="/jscss/demoimg/200908/close.gif" onClick="closeBanner();">');
theFloaters.play();
</script>
</p>
</body>
</html>
转载于:https://www.cnblogs.com/handsomer/p/4117933.html
蓝色经典的对联广告代码相关推荐
- 网页JS弹出广告代码,头部,右下角,网页中漂浮,对联广告代码等大全
01.借鉴:网页JS弹出广告代码,头部,右下角,网页中漂浮,对联广告代码等大全02.网页头部弹出广告:03.<!--首页头部广告--> 04.<script src="ht ...
- 很漂亮的蓝色经典CSS导航菜单代码
代码简介:很不错的一款蓝色风格经典的CSS导航菜单,只不过用到了几张背景图片,好像这些图片可以合并起来用,有兴趣用的朋友可以适当优化一下,从外观上来看,这款菜单还是非常好看的. 代码内容: <! ...
- JS常用脚本+html代码大全+对联广告代码效果大全
JS常用脚本 1. on_contextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键 <table border on_co ...
- html自动写对联,css实现的对联广告代码
css 代码 .couplet_ad /* 底部固定*/{position:fixed;bottom:auto; top:0; width: 120px; height: 230px; z-index ...
- 符合标准的对联广告代码
原本工作正常的对联广告突然宣布罢工,为什么?标准化真的那么脆弱吗?" 不符合标准的正常工作的对联广告: Code1<htmlxmlns="http://www.w3.org/ ...
- php对联广告,html左右对联代码 cms网站对联广告html代码
实现网页左右两侧居中的对联广告代码你只记得自己有好多朋友却从没想过小编只有你一人. 无标题文档 #left{ width:200px;height:450px; position:absolute; ...
- 网页广告代码php,【网页广告特效代码】精选5种常用的网页广告特效代码
网站少不了发布一些活动广告,网页中的广告显示效果有很多种,一般是采用JS或者JQ实现多种网页广告显示效果,以下是php中文网精选5种常用的网页广告特效代码推荐给大家下载使用! 效果预览和下载地址:ht ...
- javascript经典广告代码.rar
javascript经典广告代码.rar 转载于:https://www.cnblogs.com/hayden/archive/2009/07/31/1535749.html
- php网页悬浮对联代码,不用js多浏览器兼容纯DIV/CSS对联漂浮广告代码
纯DIV/CSS对联漂浮广告代码(无JS) 源码网两侧漂浮.经测试,兼容IE6,IE7,Firefox浏览器. CSS代码为: .r1{width:80px;height:80px;backgroun ...
最新文章
- 机器学习神器Scikit-Learn保姆教程!
- Koa入门——关键知识点总结
- linux apache目录权限配置,Linux下Apache网站目录读写权限的设置
- 字符串数组的排序c++_Java——数组相关知识点及练习演绎
- SpringBoot FK-关联表查询(二)
- 最大子段和_算法与数据结构_Python
- 计算机在资产管理中的应用,浅析计算机在学校固定资产管理中的应用
- 工商银行网银支付问题 有网站想要安装以下加载项 来自Industrial and Commercial Bank of China Limited‘ 第三方支付机构上送网联跳转报文请求参数错误
- C++【类与对象】——运算符重载
- 服务器2400系列和2600系列,英特尔至强处理器2400系列和2600系列有什么不同
- H5 --(解决)ios的webview中上/下拉露出黑灰色背景问题
- python rasterio库和gdal库匹配与冲突问题安装办法
- 【Codeforces Round #185 (Div. 2) D】Cats Transport
- java-net-php-python-2020SSM面向大学生的课程演示录像计算机毕业设计程序
- 【同一电脑原win用户信息迁移到新Win用户下python interpreter显示 no interpreter问题】
- 苹果屏蔽更新_屏蔽 iOS 系统更新的最新方法,支持所有 iPhone、iPad 设备
- 版本控制系统_繁星漫天_新浪博客
- 西子子1200与编码器
- 正则筛选图片url(js)
- LINGO如何求解数学模型