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>                 
  • 相关阅读:
    linux使用secureCRT连接(没有rsa的时候)
    linux删除某个php程序进程的组合命令
    Redis介绍以及安装(Linux)
    PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone
    linux下生成rsa密钥的方法
    mysql 的 infobright 数据库的 mediumblob 显示不了数据
    PHP中的Libevent学习
    PHP函数getopt详解
    php_sapi_name详解
    PHP使用mysqldump备份数据库(以及还原)
  • 原文地址:https://www.cnblogs.com/wantingqiang/p/1585124.html
Copyright © 2011-2022 走看看