'setInterval'에 해당되는 글 1건

  1. 2017.09.06 1초에 한번 함수 실행

<html>

<head>

</head>

<script  language="javascript"  >


var aa = 0;


function exe(){

  aa = setInterval("roofing_func()", 1000); //  1000 = 1초   1초마다 roofing_func 를 실행하라.~

}


function stop(){

  clearInterval(aa);    

}


function roofing_func(){

  console.log( 'a');

}


</script>

    <body  >

        <div  style="  height:80px ; padding-top:200px ; padding-left:200px "  >

          <a href="javascript:exe();"  >  click  </a>        

          &nbsp;&nbsp;

          <a href="javascript:stop();"  >  stop  </a>                  

        </div>

        

 

    </body>

</html>

'[.js] no category' 카테고리의 다른 글

base html 왁구  (0) 2019.08.03
include , 포함인지 여부  (0) 2017.09.13
정수로 casting 예제  (0) 2017.09.06
Posted by 혜화초보
,