timeout.close is not a function
clearInterval(timer); // 报错 打印timer是有值的,但是清除定时器失败
// 写法加个window就好了;
window.clearInterval(timer); // window.clearTimeout(timer)
timeout.close is not a function
clearInterval(timer); // 报错 打印timer是有值的,但是清除定时器失败
// 写法加个window就好了;
window.clearInterval(timer); // window.clearTimeout(timer)