您可以存储对该超时的引用,然后调用clearTimeout该引用。// in the example above, assign the resultvar timeoutHandle = window.setTimeout(...);// in your click function, call clearTimeoutwindow.clearTimeout(timeoutHandle);// then call setTimeout again to reset the timertimeoutHandle = window.setTimeout(...);