Hi makenzi.exc,
The clearTimeout method clears a timer set with the setTimeout method.
Refer below example.
HTML
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
body { font-family: Arial; font-size: 10pt; }
</style>
</head>
<body>
<input type="button" value="Start" onclick="Start()" />
<input type="button" value="Stop" onclick="Stop()" />
<hr />
<span id="lblMessage"></span>
<script type="text/javascript">
var timeOut;
function Start() {
document.getElementById("lblMessage").innerHTML = "Click Stop button with in 3 seconds to clear timeout.";
timeOut = setTimeout(function () {
document.getElementById("lblMessage").innerHTML = "Welcome to ASPSnippets";
}, 3000);
};
function Stop() {
clearTimeout(timeOut);
}
</script>
</body>
</html>
Demo
Screenshot

Downloads
Download Sample