JavaScript Reference/Javascript Methods/clearTimeout
Версия от 18:30, 25 мая 2010; (обсуждение)
"clearTimeout()" Example
<html>
<body>
<script language="javascript">
var intValue = 0
function myMethod(){
alert("timeout");
}
</script>
<button onclick="intValue=window.setTimeout("myMethod()", 1000);">Start timeout</button>
<button onclick="intValue=window.clearTimeout(intValue);">Stop timeout</button>
</body>
</html>
"clearTimeout()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |window |
+----------------+--------------------------------------------------------------+
"clearTimeout()" Syntax, Parameters and Note
Note:
Removes a timeout initialized by the setTimeout() method.
Syntax:
window.clearTimeout(param1)
Parameters:
param1 Required; the numeric timeout ID previously returned by the
window.setTimeout() method.