1.3 초 후에 자동으로 돌아갑니다
코드 사본은 다음과 같습니다.
<span id = "Totalsecond"> 3 </span> 3 초 후에 자동으로 돌아갑니다
<script language = "javaScript"type = "text/javaScript">
<!-
var second = document.getElementById ( 'TotalSecond'). TextContent;
if (navigator.appname.indexof ( "Explorer")> -1) // IE 브라우저인지 Firefox 브라우저인지 판단하고 해당 측정 값을 사용하여 초 수를 얻습니다.
{{
Second = document.getElementById ( 'TotalSecond'). InnerText;
} 또 다른
{{
Sec
}
setInterval ( "redirect ()", 1000);
함수 리디렉션 ()
{{
if (두 번째 <0)
{{
location.href = 'http://www.baidu.com';
} 또 다른
{{
if (navigator.appname.indexof ( "탐색기")> -1)
{{
document.getElementById ( 'TotalSecond'). innerText = second--;
} 또 다른
{{
document.getElementById ( 'TotalSecond'). TextContent = Second--;
}
}
}
->
</스크립트>