Yani bu kodunasıl)
function timer()
{
setTimeout(function(){alert("Out of time")}, 3000); //Alerts "Out of time" after 3000 milliseconds
}
function resetTime()
{
timer(); //this is not right, i thought it would override the first function but it just adds another timer as well which is not what I want
}
function stopTime()
{
//What could go here to stop the first function from fully executing before it hits 3000 milliseconds and displays the alert message?
}
fonksiyon zamanlayıcı (varsa javascript başka fonksiyonu ile Sayacı durdurmak sayfa yüklenirken başlar ama StopTime için bir düğme var() ve eğer bunu tıklayın, nasıl İlk fonksiyonu 3000 milisaniye isabetinden ve "Zaman doldu" uyarısını yapmaktan durdurup durdurabilir miyim?
Zamanlayıcıyı global bir varlığa adlandırmanız gerekir – colecmc