6
setInterval 중지
error핸들러 에서이 간격이 반복적으로 실행되는 것을 중지하고 싶습니다 . 가능하다면 어떻게해야합니까? // example code $(document).on('ready',function(){ setInterval(updateDiv,3000); }); function updateDiv(){ $.ajax({ url: 'getContent.php', success: function(data){ $('.square').html(data); }, error: function(){ $.playSound('oneday.wav'); $('.square').html('<span style="color:red">Connection problems</span>'); // I want to stop it here } }); }