화면에 카운터 나타내기
페이지 정보
작성자 최고관리자 작성일 21-02-10 17:32 조회 6,923 댓글 0본문
<?
$time = 100;
?>
<html>
<head>
<title>타이틀</title>
<link rel="stylesheet" href="/text.css" type="text/css">
<script language="javascript">
start = <?=$time?>;
function timer(){
if(start>=0){
var mim = parseInt( start / 60);
var sec = start % 60;
times.innerHTML= mim + " : " + sec;
setTimeout('timer()',1000);
}
start--;
}
</script>
</head>
<body OnLoad="timer()">
<span id="times"></span>
<meta http-equiv="refresh" content="<?=$time?>;<?=$PHP_SELF?>">
</body>
</html>
$time = 100;
?>
<html>
<head>
<title>타이틀</title>
<link rel="stylesheet" href="/text.css" type="text/css">
<script language="javascript">
start = <?=$time?>;
function timer(){
if(start>=0){
var mim = parseInt( start / 60);
var sec = start % 60;
times.innerHTML= mim + " : " + sec;
setTimeout('timer()',1000);
}
start--;
}
</script>
</head>
<body OnLoad="timer()">
<span id="times"></span>
<meta http-equiv="refresh" content="<?=$time?>;<?=$PHP_SELF?>">
</body>
</html>
댓글목록 0
등록된 댓글이 없습니다.