I have written a timer. The initial minutes and hours are taken from the user. It should then count down the time. However, I don't know how to convert it to count down in a div. At the moment the action occurs in a prompt box. I don't want this.
function timer() {
var mins = 1;
var secs = 10;
while (mins >= 0) {
for(var i = secs; i > 0; i--) {
setInterval(alert(mins + ":" + i),1000);
}
secs = 59;
mins--;
}
}