로그인 타이머 채택완료
김우진
7년 전
조회 1,502
<?php if ($is_member) { ?> <?php }else{ ?> <script type='text/javascript' src='https://code.jquery.com/jquery-1.9.1.min.js" target="_blank">https://code.jquery.com/jquery-1.9.1.min.js'></script> <script type="text/javascript"> $(document).ready(function() { setTimeout('ozit_timer_test()', 3000); }); function ozit_timer_test(){ location.href = 'http://naver.com" target="_blank">http://naver.com'; } </script> <?php } ?>
여기서
숫자랑 링크만 변경해서 사용하는거라고 알고 있습니다.
링크랑 숫자변경해서 해보니 잘되는것 같은데
문제는 제가 몇초로 설정했는지를 알려주는 텍스트를 사용하고싶은데 어떻게 해야되나요?
예를 들어서 60초후 로그인페이지로 이동됩니다 로그인 부탁드립니다. 라는 멘트와함께
60초부터 카운터 되는걸 작성하고 싶네요
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
7년 전
</p>
<p><script src='<a href="<a href="https://code.jquery.com/jquery-1.9.1.min.js" target="_blank" rel="noopener noreferrer">https://code.jquery.com/jquery-1.9.1.min.js</a>" target="_blank"><a href="https://code.jquery.com/jquery-1.9.1.min.js" target="_blank" rel="noopener noreferrer">https://code.jquery.com/jquery-1.9.1.min.js</a></a>'></script></p>
<p>
<span id="timer"></span>초 후 이동합니다.</p>
<p> </p>
<p><script>
var timer = 60; // 60초 설정</p>
<p>$(document).ready(function() {
ozit_timer_test();
}); </p>
<p>function ozit_timer_test(){
timer--;</p>
<p> if(timer == 0) {
location.href = '<a href="<a href="http://naver.com" target="_blank" rel="noopener noreferrer">http://naver.com</a>" target="_blank"><a href="http://naver.com" target="_blank" rel="noopener noreferrer">http://naver.com</a></a>';
} else {
$("#timer").html(timer);</p>
<p> }
setTimeout(function(){ozit_timer_test()},1000);
}
</script></p>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
김우진
7년 전
감사합니다 혹시 아이프레임보다 위에 보이게끔 설정하는거랑 텍스트 크기를 크게하는건 어떻게 하는건가요?
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인