首页/javascript外包/javascript下沉广告代码|做网页下沉广告代码

javascript下沉广告代码|做网页下沉广告代码

发布-xiaoming | 浏览量-

做网页下沉广告代码

复制内容到剪贴板
  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>北京做网页chinahegu.cn</title>    
  6. <style>    
  7. *{margin:0;padding:0;}    
  8. body {height:2000px;}    
  9. #menu {    
  10.     width:220px;    
  11.     height:420px;    
  12.     position:absolute;    
  13.     z-index:1000;    
  14.     background:url(IMG_116111-1.jpg) repeat-x top left;    
  15. }    
  16. #menu_h {    
  17.     float:right;    
  18. }    
  19. #menu_h img {    
  20.     cursor:pointer;    
  21. }    
  22. #menu_c {    
  23.     width:188px;    
  24.     height:398px;    
  25.     border:1px solid #666;    
  26.     background:#ecf6f5;    
  27.     margin:12px 0 0 5px;    
  28. }    
  29. #menu_c h2 {    
  30.     text-align:center;    
  31. }    
  32. </style>    
  33. </head>    
  34. <body>    
  35. <div id="ads" style="width:900px;height:300px;background:#369;margin:0 auto;">asdfsdafasdf</div>    
  36. <script type="text/javascript">    
  37. var time = 300;    
  38. var h = 0;    
  39. function addCount()    
  40. {    
  41.     if(time>0)    
  42.     {    
  43.         time--;    
  44.         hh = h+5;    
  45.     }    
  46.     else    
  47.     {    
  48.         return;    
  49.     }    
  50.     if(h>300)  //高度    
  51.     {    
  52.         return;    
  53.     }    
  54.     document.getElementById("ads").style.display = "";    
  55.     document.getElementById("ads").style.height = h+"px";    
  56.     setTimeout("addCount()",30);    
  57. }    
  58. window.onload = function showAds()    
  59. {    
  60.     addCount();    
  61.     setTimeout("noneAds()",7000); //停留时间自己调了    
  62. }    
  63. var T = 300;    
  64. var N = 300; //高度    
  65. function noneAds()    
  66. {    
  67.     if(T>0)    
  68.     {    
  69.         T--;    
  70.         NN = N-5;    
  71.     }    
  72.     else    
  73.     {    
  74.         return;    
  75.     }    
  76.     if(N<0)    
  77.     {    
  78.         document.getElementById("ads").style.display = "none";    
  79.         return;    
  80.     }    
  81.     document.getElementById("ads").style.height = N+"px";    
  82.     setTimeout("noneAds()",30);    
  83. }    
  84. </script>    
  85. </body>    
  86. </html>   

 

原文地址:http://www.35ui.cn/post/20110419870.html

标签北京网站制作javascript培训班

上一条: 俞敏洪经典语录大全
下一条: 网页制作html中的rel,rev是什么?

或许你还对下面的文章感兴趣