javascript - How to eliminate setInterval using clearInterval?
大家讲道理
大家讲道理 2017-05-19 10:13:54
0
3
485
     
      
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all (3)
为情所困
var myTimer = setInterval(....);

If it needs to be eliminated, then

clearInterval(myTimer)
    黄舟

    You posted such a large piece of code, but you didn’t make it clear what purpose you wanted to send it to or what kind of problems you encountered.

      刘奇

      This way of writing is not very good~
      If you are self-study, it is recommended to find some newer and better-produced resources, or MDN, don’t be led astray
      How to optimize specifically, here are two tips:

      1. Event Agent

      2. Closure

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!