JavaScript is using the timer using setInterval. Due to the nature of the screen, I'm using several. After Ajax communication, can all setInterval currently operating on the screen have a clearInterval effect? I want to stop the motion at once.
javascript html jquery css
var highestIntervalId = setInterval(";");
for (var i = 0 ; i < highestIntervalId ; i++) {
clearInterval(i);
}
setTimeout
or setInterval
returns an ID of the numeric type after execution, which increases with each function call.
Using the fact that the ID is an increasing number, it's a code that all clears by increasing from zero by the most recent call return.
© 2024 OneMinuteCode. All rights reserved.