+ 1

Help please, function name is not defined. Why?

<!DOCTYPE html> <html> <head> <title>count down </title> <script type="text/javascript"> //countdown function var countdown; var countdownNum; function countDownit(){ countdownNum = 11; countDownTrigger(); } function countDownTrigger(){ if (countdownNum > 11){ countdownNum--; document.getElementById("show").innerHTML = countdownNum; if(countdownNum > 0){ countdown = setTimeout("countDownTrigger()",1000); } } } function countDownclear(){ clearTimeout(countdown) </script> </head> <body> <div> <input type="button" onclick="countDownit()" value="Start" /> <input type="button" onclick="countDownclear()" id="" value="Stop" /> </div> <div id="show"></div> </body> </html>

20th Apr 2020, 3:57 PM
Md Iftakher Hossain
Md Iftakher Hossain - avatar
2 Réponses
+ 2
You are missing closing bracket for the countDownClear() Md Iftakher Hossain Please understand that providing a link to your code is preferred to printing your code in the question/post area. To the down voter - bad down voter, bad!
20th Apr 2020, 4:19 PM
ODLNT
ODLNT - avatar
+ 2
Thanks.
20th Apr 2020, 4:35 PM
Md Iftakher Hossain
Md Iftakher Hossain - avatar