27 lines
617 B
JavaScript
27 lines
617 B
JavaScript
{1e39a8ef0364ef625348002c6ffba429412a7af4 true 617 main.js 0xc001f124d0}
var seconds = 119,
|
|
countDiv = document.getElementById('countdown'),
|
|
secondPass,
|
|
|
|
countDown = setInterval(function(){
|
|
"use strict";
|
|
|
|
secondPass();
|
|
},1000);s
|
|
function secondPass(){
|
|
"use strict";
|
|
|
|
var minutes = Math.floor(seconds / 60),
|
|
remSeconds = seconds % 60;
|
|
|
|
if (seconds < 10){
|
|
remSeconds = "0" + remSeconds;
|
|
}
|
|
countDiv.innerHTML = minutes + ":" + remSeconds;
|
|
|
|
if (seconds > 0){
|
|
seconds = seconds - 1;
|
|
|
|
} else {
|
|
clearInterval(countDown);
|
|
countDiv.innerHTML = "Done!!";
|
|
}}; |