function flashChat(){

    var chat=document.getElementById("page_bottom");

    if(flashflag){

    chat.style.backgroundColor="#FFA500";

    flashflag=false;

    }else{

    chat.style.backgroundColor="red";

    flashflag=true;

    }

    }

    var goFlash;

    [removed]=function(){

      var msg1=<%=userLastMessage%>

      var msg2=<%=currentMsg%>

      if(msg1!=msg2){

      goFlash=setInterval(flashChat(), 1000);

      }

      }

    function loop() {

      var xhttp = new XMLHttpR1equest();

      xhttp.onreadystatechange = function () {

        if (this.readyState == 4 && this.status == 200) {

          var data = JSON.parse(this.r1esponseText);

          console.log(data);

          if(recentNum!=data.recentNum){

          goFlash=setInterval(flashChat(), 1000);

          }

          else{

          }

          temp=data.recentNum;

        }

      };


왠지 리퀘스트 영어로 치면 디씨에서 막더라


루프에서 goFlash=setInterval(flashChat(), 1000); 실행은 되는데

[removed]로 똑같은거 실행시키니까 동작을 안함

디버깅하면서 if문 내부까지 들어가는거 봄


이거 왜인지 아는분 없음?