화면에 카운터 나타내기
페이지 정보
본문
<?
$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>
- 이전글form 문에 타켓 주기 21.02.10
- 다음글// 마우스클릭,키보드 막기 21.02.10
댓글목록
등록된 댓글이 없습니다.