Name

Window.clearTimeout( ) — cancel deferred execution

Availability

JavaScript 1.0

Synopsis

                  window.clearTimeout(timeoutId)

Arguments

timeoutId

A value returned by setTimeout( ) that identifies the timeout to be canceled.

Description

clearTimeout( ) cancels the execution of code that has been deferred with the setTimeout( ) method. The timeoutId argument is a value returned by the call to setTimeout( ) and identifies which (of possibly more than one) block of deferred code to cancel.

Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.