코드 사본은 다음과 같습니다.
<script type = "text/javaScript">
var time = 300;
var h = 0;
함수 addCount ()
{
if (time> 0)
{
시간--;
H = H+5;
}
또 다른
{
반품;
}
if (h> 300) // 높이
{
반품;
}
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; //키
기능 noneads ()
{
if (t> 0)
{
티--;
n = n-5;
}
또 다른
{
반품;
}
if (n <0)
{
document.getElementById ( "ads"). Style.Display = "none";
반품;
}
document.getElementById ( "ads"). style.height = n+"px";
settimeout ( "noneads ()", 30);
}
</스크립트>
코드 사본은 다음과 같습니다.
<div style = "margin : 0px auto; 너비 : 900px; 배경 : #369; 높이 : 300px; 색상 : #fff"id = "ads"> wulin.com_www.vevb.com </div>