오늘 하루 노가다 한듯 힘이 빠져버렸네...
위와 같이 타이머를 달았다.. 에러시에 5초뒤에 자동으로 홈페이지로 이동되게 했다.
아래의 코드를 <head> </head>안에 넣는다.<script type="text/javascript">
document.write('<st'+'yle>');
document.write('td {font-size:12px; font-family:굴림; text-decoration:none; }');
document.write('A:link,A:active,A:visited{text-decoration:none;font-size:12PX;color:#333333;}');
document.write('A:hover {text-decoration:none; color:ff9900}');
document.write('font { font-size: 9pt; }');
document.write('.input {background-color:rgb(240,240,240);border-width:1pt; height:16pt;cursor:hand;}');
document.write('.input2 {border-width:1; border-color:rgb(204,204,204); border-style:solid;}');
document.write('.input3 { border-width:1; border-style:none; border-color:#000000; color:#0084D4; background-color:white;text-align:right;}');
document.write('.input4 { scrollbar-face-color: #FFCC33;scrollbar-shadow-color: #ffffff;scrollbar-highlight-color: #F3f3f3;scrollbar-3dlight-color: #ffffff;scrollbar-darkshadow-color: #F3f3f3;scrollbar-track-color: #ffffff;scrollbar-arrow-color: #f9f9f9; }');
document.write('</st'+'yle>');
var Counter = 5; // 대기시간 지정
var goUrl="
http://canxan.com/~zlgun/tt "; //이동할 웹페이지
var TIME=1*1000; // 1초 기준 /
var TIMER=null;
function stop() {
if(TIMER) {
clearInterval(TIMER);
TIMER=null;
}
}
function start() { stop();TIMER=setInterval("click()",TIME); }
function click() {
var f = document.tipkorea;
if(!f.pause.checked) {
if ((f.count.value=Counter--) < 0) { stop(); }
if (!Counter) { document.location=goUrl; }
}
}
function init() {
var f = document.tipkorea;
start();f.pause.checked=false;
}
window.onload = init;
</script>
알릭님의 팁으로 내 블로그 환경에 맞게 약간 수정해주었다.
스킨에서 문제가 있었고 게다가 사이드바 숨기기 소스가 안먹혔다가 조정...
다시 소스를 수정하고 나니 본문이 아래로 꺼져나타나서 다시 수정...
덕분에 css구조를 다시한번 되세기게 되었다...물론 사이드바 숨기기 소스는 오른쪽에만 적용...
Leave your greetings here.