How can I disable all setTimeout events?

前端 未结 4 1836
清酒与你
清酒与你 2020-12-12 12:12

I am using ajax and asp.net. iI have a javascript function which creates many other javascript functions with setTimeout. After asynchronous postback happenes, I want to dis

4条回答
  •  情话喂你
    2020-12-12 12:42

    Not sure if you can do this globally, but the most common method is to use clearTimeout. You pass the return value of setTimeout() to clearTimeout(), you could use a global var to store all timeout vars.

提交回复
热议问题