I have a simple setInterval setup like so:
var time = 0;
function a(){
window.setInterval(timer, 1000);
}
Which executes this function:
function timer() {
time +=1;
document.getElementById("a").innerHTML = time + "s"
}
HTML is very simple for this. It just displays as 0s
and increases.
The problem I am having is that I can't seem to get it to display in a format like this 00:00:00
.
Any help is much appreciated!