代码
   <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> 

 

posted on 2010-01-18 13:40  fxh嘟嘟  阅读(379)  评论(0编辑  收藏  举报