[자바스크립트][펌]자동으로 새로고침이 필요한 페이지에 삽입 - 찾으려면 보이지 않는 팁
<body>
<p align=center>
<font style="color:#787878;font-size:9pt">
페이지 자동 새로고침 예제 입니다 <br><br>
아래의 상태바에 안내문이..
</font>
<script language="javascript">
var limit="0:10"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+"초 후에 자동으로 페이지를 새로고침 합니다!"
else
curtime=cursec+"초 후에 자동으로 페이지를 새로고침 합니다!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}
window.onload=beginrefresh
</script>
</body><input type=button name=simabuttonviewsource value="View Source" onClick='window.location="view-source:"+window.location.href'>
[출처] : http://www.happyscript.net
기재되어 있는 소스중에서 var limit="0:10" 값을 적절히 조절하시면 됩니다.
만약, 20초마다 자동으로 브라우저를 refresh하고 싶다면, var limit="0:20" 과 같은 형식으로 수정하세요.<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
<p align=center>
<font style="color:#787878;font-size:9pt">
페이지 자동 새로고침 예제 입니다 <br><br>
아래의 상태바에 안내문이..
</font>
<script language="javascript">
var limit="0:10"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+"초 후에 자동으로 페이지를 새로고침 합니다!"
else
curtime=cursec+"초 후에 자동으로 페이지를 새로고침 합니다!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}
window.onload=beginrefresh
</script>
</body><input type=button name=simabuttonviewsource value="View Source" onClick='window.location="view-source:"+window.location.href'>
[출처] : http://www.happyscript.net
기재되어 있는 소스중에서 var limit="0:10" 값을 적절히 조절하시면 됩니다.
만약, 20초마다 자동으로 브라우저를 refresh하고 싶다면, var limit="0:20" 과 같은 형식으로 수정하세요.<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 327 | 20년 전 | 3733 | ||
| 326 | 20년 전 | 4809 | ||
| 325 |
hwatta
|
20년 전 | 2425 | |
| 324 |
|
20년 전 | 3112 | |
| 323 | 20년 전 | 5813 | ||
| 322 |
hwatta
|
20년 전 | 2819 | |
| 321 |
hwatta
|
20년 전 | 2295 | |
| 320 |
yesmoa
|
20년 전 | 4552 | |
| 319 | 20년 전 | 2658 | ||
| 318 | 20년 전 | 2224 | ||
| 317 |
kyodon
|
20년 전 | 2758 | |
| 316 | 20년 전 | 2542 | ||
| 315 |
|
20년 전 | 2862 | |
| 314 |
|
20년 전 | 3308 | |
| 313 |
|
20년 전 | 2620 | |
| 312 |
yesmoa
|
20년 전 | 4686 | |
| 311 | 20년 전 | 3224 | ||
| 310 |
홀로남은자
|
20년 전 | 4529 | |
| 309 | 20년 전 | 2983 | ||
| 308 | 20년 전 | 4098 | ||
| 307 | 20년 전 | 4336 | ||
| 306 | 20년 전 | 7006 | ||
| 305 | 20년 전 | 3836 | ||
| 304 | 20년 전 | 2733 | ||
| 303 |
크리스탈처럼
|
20년 전 | 4376 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기