• 漂浮广告(从上往下飘最后消失)


    代码
       <script type="text/javascript"> 
            
                
    var adtime = 100;   //时间
                var adheight =0;    //高度
                
                $(document).ready(
    function(){
                    addCount(); 
                    adtime
    =300;
                    setTimeout(
    "noneAds()",7000); //停留时间
                })
     
                
    function addCount() 
                { 
                    
    if(adtime>0) { 
                        adtime
    --
                        adheight 
    = adheight+5
                    }
    else { 
                        
    return
                    } 
                    
    if(adheight>415)  //高度 
                    { 
                        
    return
                    } 
                    document.getElementById(
    "ad01").style.display = ""
                    document.getElementById(
    "ad01").style.height = adheight+"px"
                    setTimeout(
    "addCount()",30); 
                } 
                
    var N = 415//高度 
                function noneAds() { 
                    
    if(adtime>0){ 
                        adtime
    --
                        N 
    = N-5
                    }
    else { 
                        
    return
                    } 
                    
    if(N<0){ 
                        document.getElementById(
    "ad01").style.display = "none"
                        
    return
                    } 
                    document.getElementById(
    "ad01").style.height = N+"px"
                    setTimeout(
    "noneAds()",30); 
                } 
            
    </script> 
  • 相关阅读:
    SASS搭建流程
    Javascript模块化编程(一)
    Javascript模块化编程发展历史
    jQuery文档处理
    jQuery事件对象
    软件开发中的11个系统思维定律
    Silverlight实例教程 理解Navigation导航框架Frame类
    eclipse自动关闭的原因
    你应该知道的15个Silverlight诀窍
    Eclipse 启动不起来异常:JVM terminated. Exit code=1
  • 原文地址:https://www.cnblogs.com/fanxianhua/p/1650665.html
Copyright © 2020-2023  润新知