xuan的空间

我们一直在努力....

不记录cookie的顶部伸缩广告源代码

标签: JS源代码

不记录cookie的顶部伸缩广告源代码如下:

XML/HTML代码
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  2. <html xmlns="http://www.w3.org/1999/xhtml">  
  3. <head>  
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />  
  5. <title>JS特效代码大全(二)能记录cookie的顶部伸缩广告-百洋软件研究实验室</title>  
  6. </head>  
  7.   
  8. <body>  
  9. <div id="ads" style=" width:620px; margin:auto; display:none; margin-top:25px; height:0px;overflow:hidden; ">    
  10.   <a href="http://www.po-soft.com" target="_blank"><img src="http://www.po-soft.com/images/image1.jpg" alt="百洋软件研究实验室" width="620" height="195" border="0"/></a> </div>  
  11.   <p  align="center" style="line-height:24px;">本demo来源于<a href="http://www.po-soft.com/" target="_blank">百洋软件研究实验室</a>博客的<br />  
  12. <a href="http://www.po-soft.com/blog/xuan/145.html">JS特效代码大全(二)能记录cookie的顶部伸缩广告</a>一文。</p>  
  13. </body>  
  14. </html>  
  15. <script type="text/javascript" language="javascript">  
  16.     var time = 500;   
  17.     var h = 0;   
  18.     function addCount()   
  19.     {   
  20.         if(time>0)   
  21.         {   
  22.             time--;   
  23.             hh = h+5;   
  24.         }   
  25.         else   
  26.         {   
  27.             return;   
  28.         }   
  29.         if(h>198)  //高度   
  30.         {   
  31.             return;   
  32.         }   
  33.         document.getElementById("ads").style.display = "";   
  34.         document.getElementById("ads").style.height = h+"px";   
  35.         setTimeout("addCount()",30);    
  36.     }   
  37.        
  38.     window.onload = function showAds()   
  39.     {   
  40.         addCount();   
  41.         setTimeout("noneAds()",7000); //停留时间自己适当调整   
  42.     }   
  43.     </script>  
  44.        
  45.     <script type="text/javascript" language="javascript">  
  46.     var T = 500;   
  47.     var N = 195; //高度   
  48.     function noneAds()   
  49.     {   
  50.         if(T>0)   
  51.         {   
  52.             T--;   
  53.             NN = N-5;   
  54.         }   
  55.         else   
  56.         {   
  57.             return;   
  58.         }   
  59.         if(N<0)   
  60.         {   
  61.             document.getElementById("ads").style.display = "none";   
  62.             return;   
  63.         }   
  64.            
  65.         document.getElementById("ads").style.height = N+"px";   
  66.         setTimeout("noneAds()",30);    
  67.     }   
  68.     </script>  

返回:JS特效代码大全(二)能记录cookie的顶部伸缩广告

另一篇:记录cookie的顶部伸缩广告源代码

相关文章: JS特效代码大全(一)IE6下PNG图片透明效果的JS特效代码

附件:


    评分: 请先登录再投票,同一篇博客一月只能投票一次!
    无人投票

相关博客:


评论

游客 2011-4-1 13:46:53  
郭建春 2011-11-26 13:14:51   回复

谢谢分享。


发表评论

验证码:
关注此文的人们还关注