'자동새로고침'에 해당되는 글 1건

  1. 2007.09.19 웹페이지 자동으로 새로고침(Refresh) 시키기
2007. 9. 19. 15:17

iframe으로 웹페이지를 집어넣고 헤더에서 iframe을 자동으로 새로고침하는 방법입니다.

로컬에서 실행하게 되면 보안경고창이 뜨는데 보안수준을 낮추시거나 인터넷웹페이지에 올려놓고 실행하면 됩니다.

iframe 의 주소와 새로고침을 하는 시간을 바꿔주시면 됩니다.

Refresh.htm

<HTML>
<HEAD>
<TITLE>실시간 새로고침</TITLE>

<!-- 자동새로고침 -->

<SCRIPT language="JavaScript">

setTimeout("history.go(0);", 100000); //1000=1초 60000=60초

start = 100; //타이머의 시간. 상단의 0세개를 지운것과 같아야함
function timer(){
    if(start>=0){
        times.innerHTML=start;
        setTimeout('timer()',1000);
    }
    start--;
}
</script>


<style>
.input {font-family:tahoma; font-size:9pt; color:#333333;}
</style>

</HEAD>

<body scroll=no leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="timer()">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td bgcolor="#ededed">
      <table border="0" cellspacing="0" cellpadding="2" align="center">
        <tr>
          <td align="right" class=input>Next refresh Count</td>
    <td align="right" width="25" class=input><font color=#ff0000><b><span id="times"></span></b></font>
</td>
          <td class=input>sec.</td>
  </tr>
</table>

    </td>
</tr>
<tr>
<td height=1 bgcolor=#cccccc></td>
</tr>
</table>

 <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
   <td>

<iframe name=iframe1 src="http://www.naver.com" width=100% height=97% frameborder="0" scrolling="auto">
</iframe>

   </td>
  </tr>
 </table>

</BODY>
</HTML>

관련글 보기
2007/10/06 - [윈도우즈/컴퓨터] - 웹페이지에서 html 소스코드 쉽게 복사하기
2007/10/02 - [윈도우즈/컴퓨터] - 웹페이지에서 마우스 오른쪽 눌렀을때 프로그램 실행시키기
2007/09/25 - [윈도우즈/컴퓨터] - 랜카드 설정변경으로 웹페이지 로딩속도 올리기
2007/09/25 - [윈도우즈/컴퓨터] - 웹페이지 오른쪽 눌렀을때 스크롤을 최상단,최하단으로 옮기는 메뉴

Posted by jinmoda