zoukankan      html  css  js  c++  java
  • DZ7.0自动伸缩广告

    <div id="divbig" style="100%; height:300px;font-size:0px;"><img id="imgs" style="100%"></div>
       <script language="javascript">
         var ishow=10;
         var jshow=5,d;

        var  bigimg="http://www.myzyb.cn/images/adpic/big.gif";
        var smallimg="http://www.myzyb.cn/images/adpic/small.gif";
        var bigurl="http://www.myzyb.cn/forum-91-1.html";
        var smallurl="http://www.myzyb.cn/forum-76-1.html";

         d=document.getElementById("divbig");
    m=document.getElementById("imgs");       event1();
           function show1()
         {
           event1();
      if(d.style.height=="9px"||d.style.height=="10px")
             {
               d.style.height=0;
              event2();
               setTimeout("show2()",20);
               return;
             }
             m.style.height=300-ishow+"px";
             d.style.height=300-ishow+"px";
             ishow=ishow+10;
             setTimeout("show1()", 2);
        }

         function show2()
         {
               event2();
     if(d.style.height=="100px")
            {
                return;
            }
            m.style.height=jshow+"px";
            d.style.height=jshow+"px";
            jshow+=5;
            setTimeout("show2()", 1);
         }
         window.onload=function()
         {
              setTimeout("show1()",5000);
         }

         function event1()
         {
             m.src=bigimg;
             d.style.cursor="pointer";
             d.onclick=function()
             {
                window.open(bigurl);
             }
         }

         function event2()
         {
             m.src=smallimg;
             d.style.cursor="pointer";
             d.onclick=function()
             {
                window.open(smallurl);
             }
         }
    </script>                 
  • 相关阅读:
    CDH简易离线部署文档
    算法图解读书笔记
    html 知识整理
    Django admin 组件 原理分析与扩展使用 之 sites.py (一)
    阿里云 centos7 django + uWSGI+Nginx + python3 部署攻略
    git 命令和使用场景总结
    由select引发的思考
    Python 实现单例模式的一些思考
    pep 8 规范的一些记录
    python 垃圾回收机制的思考
  • 原文地址:https://www.cnblogs.com/wantingqiang/p/1585124.html
Copyright © 2011-2022 走看看