找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 103|回复: 2

在线等关于首页顶部收缩广告代码问题,快疯了

[复制链接]
发表于 2010-1-10 05:39:59 | 显示全部楼层 |阅读模式 IP:江苏扬州
<script src="taobao/a.js"></script>

<div id="topAds_chk_show" style="margin-top:0px; margin-bottom:0px; width:956px; display:block;">
<a href="http://shop35576578.taobao.com/" target="_blank">
<img src="taobao/shou3.gif" width="900" height="40" border="0" /></a><a href="javascript:close_chk_show();"><img src="taobao/shou4.gif" width="52" height="40" border="0" alt="关闭" /></a>
</div>

调用的JS文件内容为以下
function checktopAds()
{   
   
   return true;   
}

function do_it()
{
  if ( checktopAds() )
  {
  var anim = function()
    {
      n += 5;
        if(n >= 45){
        document.getElementById('topAds_chk_show').style.marginTop = "0";
        window.clearInterval(t1);
        }else{
        document.getElementById('topAds_chk_show').style.marginTop = "-"+(45 - n)+"px";
        }
      },n=0;
      var t1 = window.setInterval(anim,80);
    }
}

function close_chk_show()
{

  var anim = function()
  {
    n += 5;
    if(n >= 45){
    document.getElementById('topAds_chk_show').style.marginTop = "-45px";
    window.clearInterval(t1);
    }else{
    document.getElementById('topAds_chk_show').style.marginTop = "-"+ n +"px";
    }
  },n=0;

    var t1 = window.setInterval(anim,80);
}

问题现在就是我想在这个广告载入时是有动感的慢慢载入,就像关闭时慢慢退出一样,上面这代码是打开主页就显示广告,我要的效果就像支付宝(https://www.alipay.com)首页的那个收缩广告一样,而且我还想加一句可以在一定时间内自己关闭广告慢慢退出的效果,求大家帮帮忙,在这感激不尽!
发表于 2010-1-10 05:40:03 | 显示全部楼层 IP:江苏扬州
调用方法:<script language=javascript src="/Js/JS名.js"></script>

JS代码:

document.write('<DIV align=center ID="hiddenLayer" style="display: none;">');
document.write('<img src="http://www.xxx.com/images/2008/05/2008050010.jpg" border=0 width="990" height="555" alt="为汶川地震中遇难同胞志哀!" align=top></DIV>');

function changediv()
{document.getElementById('hiddenLayer').style.display = "block";setTimeout("hidediv()",12000);}

function hidediv(){document.getElementById('hiddenLayer').style.display="none";SYtag=2;}

function showfull(){setTimeout("changediv()",3000);}

showfull();
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 17:28 , Processed in 0.226892 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表