head.php 에 넣는 자바스크립트 정보
head.php 에 넣는 자바스크립트본문
head.php 에 숫자가 하나씩 내려가는 카운트다운 타이머를 자바스크립트로 만들었습니다.
잘동 잘 되고 디스플레이도 참 잘되는데요..
유독 이상하게
게시판 write 페이지 볼때만 아예 안뜨는문제는 뭘까요..;;;
list랑 view볼때는 잘 나옵니다...... ㅜㅜ
베리어블 이름도 안겹치게 복잡한거 만들었고요
js 파일 임풀트도 잘 되어있고요...
도대체 list랑 view 볼때는 잘나오는데 write 볼때는 안나오는 이유가 뭘까요..?? ㅠㅠ
도와주세요 write 페이지 볼때 불러와지는 자바스크립트 펑션이 겹치는거같은데
뭔지 모르곘습니다 ㅠㅠ
잘동 잘 되고 디스플레이도 참 잘되는데요..
유독 이상하게
게시판 write 페이지 볼때만 아예 안뜨는문제는 뭘까요..;;;
list랑 view볼때는 잘 나옵니다...... ㅜㅜ
베리어블 이름도 안겹치게 복잡한거 만들었고요
js 파일 임풀트도 잘 되어있고요...
도대체 list랑 view 볼때는 잘나오는데 write 볼때는 안나오는 이유가 뭘까요..?? ㅠㅠ
도와주세요 write 페이지 볼때 불러와지는 자바스크립트 펑션이 겹치는거같은데
뭔지 모르곘습니다 ㅠㅠ
window.onload=WindowLoad;
function WindowLoad(event) {
ActivateCountDown("CountDownPanel", 100);
}
var _countDowncontainer=0;
var _currentSeconds=0;
function ActivateCountDown(strContainerID, initialValue) {
_countDowncontainer = document.getElementById(strContainerID);
if (!_countDowncontainer) {
alert("count down error: container does not exist: "+strContainerID+
"\nmake sure html element with this ID exists");
return;
}
SetCountdownText(initialValue);
window.setTimeout("CountDownTick()", 1000);
}
function CountDownTick() {
if (_currentSeconds <= 0) {
alert("your time has expired!");
return;
}
SetCountdownText(_currentSeconds-1);
window.setTimeout("CountDownTick()", 1000);
}
function SetCountdownText(seconds) {
//store:
_currentSeconds = seconds;
//get minutes:
var minutes=parseInt(seconds/60);
//shrink:
seconds = (seconds%60);
//get hours:
var hours=parseInt(minutes/60);
//shrink:
minutes = (minutes%60);
//build text:
var strText = AddZero(hours) + ":" + AddZero(minutes) + ":" + AddZero(seconds);
//apply:
_countDowncontainer.innerHTML = strText;
}
function AddZero(num) {
return ((num >= 0)&&(num < 10))?"0"+num:num+"";
}
댓글 전체

안나오는 페이지를 링크해 주시면 디버깅하는데 편리하겠네요 :)