<!-- body { margin:0;background:#000; } img { border:0; } --> <!-- var nowheight=0; //初始广告层高度 var maxheight=224; //广告层最大高度 var adobj; var opendiv; var closdiv; var addfunc; var handobj; var reducefunc; var speed=7; //层卷动速度 function showtopad() { adobj=document.getElementById("bigad"); opendiv=document.getElementById("opendiv"); closdiv=document.getElementById("closdiv"); if (nowheight<=0) { opendiv.style.display="none"; adobj.style.display="block"; addfunc=setInterval("addheight()",1); } } function closetopad() { if (nowheight>0) { callreduceheight(); if (typeof(handobj)=="number") { clearTimeout(handobj); } } } function addheight() { nowheight+=speed; if (nowheight>maxheight) { clearInterval(addfunc); closdiv.style.top=maxheight-30; closdiv.style.display="block"; handobj=setTimeout("callreduceheight()",6000); return; } adobj.style.height=nowheight+"px"; } function callreduceheight() { closdiv.style.display="none"; reducefunc=setInterval("reduceheight()",1); } function reduceheight() { adobj.style.height=nowheight+"px"; nowheight-=speed; if (nowheight<=0) { clearInterval(reducefunc); adobj.style.display="none"; opendiv.style.display="block"; return; } } //--> 打开 关闭 上面是广告,你可以点击看看效果!^_^ [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]