프로그램/Html & Js & Css

[Js] 일정시간마다 특정 함수를 실행시키는 방법

영혼과영혼의양식 2012. 9. 28. 11:13

■ 일정시간마다 특정 함수를 실행시키는 방법

=> setInterval(); 실행



ex) 60분마다 jsRealTimeView(); 함수를 실행시키는 스크립트

<script type="text/javascript">

var time = 1000 * 60 * 60;           //1초 * 60 * 60

setInterval("jsRealTimeView()", time);

</script>