Script Numaratoare inversa
Scris: Mie Dec 11, 2013
Salut , imi puteti da si mie un script numaratoare inversa de 10 minute.
"Va rugam asteptati: 10 minute."
Multumesc.
"Va rugam asteptati: 10 minute."
Multumesc.
Cursuri online, tutoriale, jocuri si anime - gratuite
https://marplo.net/forum/
Cod: SelectaĊ£i tot
Asteptati: <span id="showmns">00</span>:<span id="showscs">00</span>
<script type="text/javascript"><!--
function countdownTimer(mnt, scs) {
// https://coursesweb.net/javascript/
// gets data for minutes and seconds
ctmnts = mnt;
ctsecs = scs;
// decrease seconds, and decrease minutes if seconds reach to 0
ctsecs--;
if(ctsecs < 0) {
if(ctmnts > 0) {
ctsecs = 59;
ctmnts--;
}
else {
ctsecs = 0;
ctmnts = 0;
}
}
// display the time in page, and auto-calls this function after 1 seccond
if(document.getElementById('showmns') && document.getElementById('showscs')) {
document.getElementById('showmns').innerHTML = ctmnts;
document.getElementById('showscs').innerHTML = ctsecs;
}
if(ctsecs > 0 || ctmnts > 0) setTimeout('countdownTimer('+ ctmnts +', '+ ctsecs +')', 1000);
else alert('Gata');
}
// strat the countdown (10 minutes, 0 seconds)
countdownTimer(10, 0);
//-->
</script>