首页/js外包代码/下沉广告js代码|js下沉广告代码推荐

下沉广告js代码|js下沉广告代码推荐

发布-xiaoming | 浏览量-

js下沉广告代码推荐

直接保存另存html页面就可以使用了,哈哈,有问题找我 :查看实例

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>下沉广告js代码-35ui.cn</title>
<style>
*{margin:0;padding:0;}
body {height:2000px;}

</style>
</head>
<body>
<div id="ads" style="width:900px;height:300px;background:#369;margin:0 auto; font-size:120px; text-align:center"><a href="http://www.35no.cn" target="_blank" style="color:#FFF">淘宝客</a></div>
<script type="text/javascript">
var time = 300;
var h = 0;
function addCount()
{
    if(time>0)
    {
        time--;
        h = h+5;
    }
    else
    {
        return;
    }
    if(h>300)  //高度
    {
        return;
    }
    document.getElementById("ads").style.display = "";
    document.getElementById("ads").style.height = h+"px";
    setTimeout("addCount()",30);
}
window.onload = function showAds()
{
    addCount();
    setTimeout("noneAds()",7000); //停留时间自己调了
}
var T = 300;
var N = 300; //高度
function noneAds()
{
    if(T>0)
    {
        T--;
        N = N-5;
    }
    else
    {
        return;
    }
    if(N<0)
    {
        document.getElementById("ads").style.display = "none";
        return;
    }
    document.getElementById("ads").style.height = N+"px";
    setTimeout("noneAds()",30);
}
</script>
</body>
</html>
 

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

标签js下沉广告代码js广告代码

上一条: 标准对联广告Js代码|简单对联广告代码
下一条: 最新CDN托管的JQUERY库地址大全

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