Timing Functions in Java Script

Setting Timing Functions


setTimeout(FunctionName,Time);

Eg

<button onclick=”setTimeout(fff, 4000);”>Click for Hello</button>

<script>
function fff() {
    alert(‘Hello’);
}
</script>


clearTimeout(VariableName);

<p>Click “Start”. Wait for 4 seconds, Alert “hello” will appear.</p>
<p>Click “Stop” before 4 seconds to stop the function started.</p>

<button onclick=”aaa = setTimeout(fff, 4000)”>Try it</button>

<button onclick=”clearTimeout(aaa)”>Stop it</button>

<script>
function myFunction() {
    alert(“Hello”);
}
</script>

Take Your Free Live Demo Class Now

Enter Your DETAILS BELOW

To Get Complete Information or We Will Call You

We Will Send You the Course Fees Details In Below Number

Enter Your DETAILS BELOW

We Will Call Back You Shortly

Enter Your DETAILS BELOW

We Will Call Back You Shortly

Enter Your DETAILS BELOW

Enter Your DETAILS BELOW TO take

free demo class