ZNZ'S Blog 原创博客

个人独立博客,记录生活、网络心得体验。 My Blog Life...
  • 首页
  • 留言
  • 博客相关
  • 网络心得
  • 电脑相关
  • 简单心情
  • 偶尔娱乐
  • 博客赚钱
  • 诗词歌赋
  • 链接
上一篇:2009年国家公务员考试时间表
下一篇:腾讯QQ强制卸载彩虹QQ彩虹团队回应

漂浮广告代码

[不指定 2008/11/26 19:50 | by vjuke ]
大 | 中 | 小
本代码可实现一个页面多个漂浮广告


<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">  
<title>Rimifon 多实例漂浮广告源代码</title>  
<script language="javascript" type="text/javascript">
var Rimifon = {  
    "Ads" : new Object,  
    "NewFloatAd" : function(imgUrl, strLink)  
    {  
        var ad = document.createElement("a");  
        ad.DirV = true;  
        ad.DirH = true;  
        ad.AutoMove = true;  
        ad.Image = new Image;  
        ad.Seed = Math.random();  
        ad.Timer = setInterval("Rimifon.Float(" + ad.Seed + ")", 50);  
        this.Ads[ad.Seed] = ad;  
        ad.Image.Parent = ad;  
        ad.style.position = "absolute";  
        ad.style.left = 0;  
        ad.style.top = 0;  
        ad.Image.src = imgUrl;  
        ad.Image.onmouseover = function(){this.Parent.AutoMove = false;}  
        ad.Image.onmouseout = function(){this.Parent.AutoMove = true;}  
        if(strLink)  
        {  
            ad.href = strLink;  
            ad.Image.border = 0;  
            ad.target = "_blank";  
        }  
        ad.appendChild(ad.Image);  
        document.body.appendChild(ad);  
        return ad;  
    },  
    "Float" : function(floatId)  
    {  
        var ad = this.Ads[floatId];  
        if(ad.AutoMove)  
        {  
            var curLeft = parseInt(ad.style.left);  
            var curTop = parseInt(ad.style.top);  
            if(ad.offsetWidth + curLeft > document.body.clientWidth + document.body.scrollLeft - 1)  
            {  
                curLeft = document.body.scrollLeft + document.body.clientWidth - ad.offsetWidth;  
                ad.DirH = false;  
            }  
            if(ad.offsetHeight + curTop > document.body.clientHeight + document.body.scrollTop - 1)  
            {  
                curTop = document.body.scrollTop + document.body.clientHeight - ad.offsetHeight;  
                ad.DirV = false;  
            }  
            if(curLeft < document.body.scrollLeft)  
            {  
                curLeft = document.body.scrollLeft;  
                ad.DirH = true;  
            }  
            if(curTop < document.body.scrollTop)  
            {  
                curTop = document.body.scrollTop;  
                ad.DirV = true;  
            }  
            ad.style.left = curLeft + (ad.DirH ? 1 : -1) + "px";  
            ad.style.top = curTop + (ad.DirV ? 1 : -1) + "px";  
        }  
    }  
}  
</script>  
</head>  
  
<body>  
<div style="height:800px"></div>  
<script language="javascript" type="text/javascript">  
Rimifon.NewFloatAd("http://www.baidu.com/img/baidu_logo.gif", "http://www.baidu.com/");  
var ad = Rimifon.NewFloatAd("http://www.google.com/intl/zh-CN/logos/Logo_60wht.gif","http://www.google.com/");  
ad.style.left = 400;  
ad.style.top = 300;  
ad.Image.width = 176;  
ad.Image.height = 77;  
</script>  
</body>  
</html>

©如转载本站文章,请注明: 转载自: ZNZ'S Blog
本文链接地址:http://www.amznz.com/Floating-ad-code/
版权所有!转载时请务必保留文章链接及出处-商业媒体转载须获得授权!


Here,knowledge & happiness to U,Enjoy it all!
<感谢您的来访,路过请留名>

订阅ZNZ-BLOG RSS如果你喜欢本文或对我的博客感兴趣,请订阅本博客。

建立独立博客 建立像我一样的独立博客?

相关日志
AdSense 是与非:广告单价高收入就高
60.190.105.9 讨厌的窗口广告
百度广告管家一段式与两段式代码的区别
网站网页黑白效果代码
promoteburner 广告联盟
DZ论坛最佳封杀自动发帖机方法

最新日志 随机日志 综合排行
有工资卡的朋友可以...
同一身份证认证多个...
高权重外链博客资源
2010高考录取查...
CO域名今晚凌晨...
3800元台式组装...
推荐国外5个高清桌...
腾讯网页游戏中心
AdSense 是...
挤进全球排名前10...
锁
电脑桌面图标的黑方...
广告合作
腾讯发布 QQ20...
The pros ...
How to Bu...
网站统计的ip,p...
09春晚魔术的秘密
WIN7+IE8 ...
解锁SIM卡密码
电影《罗马帝国艳情...
在哪个网站能找一夜...
世界十大禁片
植物大战僵尸-完美...
2009年6月英语...
汽车驾驶之倒车模拟...
致所有来访者(09...
反思职高女生被集体...
大漠苍狼-TXT-...
博客
Tags: 漂浮 , 广告 , 代码 , html , 网页
网络心得 | 评论(0) | 引用(0) | 阅读(1992)
引用地址:
注意: 该地址仅在今日23:59:59之前有效
加入收藏
☞ 有偿参加问卷调查,用您的意见赚美金、 赢奖品$!
☞ 体验广告,玩游戏,免费换奖品!(Q币、 话费、数码等)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]
               

 
簡→繁轉換
  • 轉換到繁體中文
没有找到想要的?试试搜索吧!
公告
博客语:
忧伤的灵,使骨枯干。

ZNZ'S BLOG RSS订阅
搜索本站
试试Google站内搜索吧!
也许你会感兴趣@

♥ 在这里宣传你的产品?点击这里»
分类
  • 网络心得 [207] RSS
  • 博客相关 [43] RSS
  • 生活休闲 [67] RSS
  • 偶尔娱乐 [93] RSS
  • 简单心情 [83] RSS
  • 诗词歌赋 [25] RSS
  • 程序语言 [17] RSS
  • 电脑相关 [54] RSS
  • 手机信息 [40] RSS
  • 博客网赚 [40] RSS
  • 软件软体 [12] RSS
  • 教程教学 [59] RSS
  • 故事寓言 [18] RSS
  • 其他文章 [68] RSS
  • 财富金钱 [9] RSS
博客项目
  • 广告合作 博客投稿 博客历史
  • 订阅本站的 RSS 2.0 新闻聚合Tagcloud
  • Blog Advertisers
    最新评论
    • 有想法,学习学习!
    • 不错,学习了,hfxdn.c...
    • 改天我试试,
    • 不错的法儿,就是我太懒了
    • 博主写的很用心,赞一个,继续...
    • vibram five fi...
    • 10*a=9.9999999...
    • 现在人的钱都不存银行了啊。。...
    博主推荐
    申请免费国外PHP高速空间
    做任务赚现金
    博客广告

    ♥ 在这里宣传你的产品?点击这里»
    博客随机日志
    • 网页中插入Flash代码的方...
    • 快速收取Google AdS...
    • 一段代码"黑&qu...
    • 推广和经营新建网站的心得
    • Google Adsense...
    • 邮件接收你的Google A...
    • 我是有原则的~~(笑话转贴)
    • 写广告文章的几个要点
    • 此花只开于黄泉,黄泉路之唯一...
    • .CM域名开放注册
    • 有生之年不在有的时间
    • NBA09-10赛季季前赛赛...
    • 电影《人兽杂交》 DVD 下...
    • “三国”中最精辟的10句话
    • 局域网中加速启动速度
    • 午后
    • Paypal美金兑换人民币价...
    • 脑袋短路的迹象
    • 麒润广告联盟被黑
    • 西联汇款取款有效期最新更新
    • 让Office2007的.d...
    • 打造亿万富翁的神奇公式
    • 留学美国哪种方式适合你?
    • between aircra...
    • 请你说出口
    统计
    访问次数 2797353
    今日访问 1840
    日志数量 838
    评论数量 2762
    留言数量 455
    注册用户 7025
    在线人数 76
    全站连接
    传奇私服 传奇私服 The Body Shop官方网站 汽狗网 企业名录 星魂黄页网 北京发票 最好的减肥药 最有效的减肥产品 淘宝网购物 Christian louboutin wedding dress links of london 透视眼镜 Abercrombie and Fitch トリーバーチ 得意生活 祛痘产品哪种好
    © Copyright ZNZ'S BLOG 2008-2010 | Theme revise by Amznz.com | Powered by Bo-Blog祈祷世界和平 阿门
    苏ICP备09065647号 | Hosting by SiHost | | prom dresses | chanel watches | Coach outlet | coach bags | supra footwear