+ 2
How to place the output of a code in an container tag
i want place this output of this code in a container tag function printTime() { var d = new Date(); var hours = d.getHours(); var mins = d.getMinutes(); var secs = d.getSeconds(); document.body.innerHTML = hours+":"+mins+":"+secs; } setInterval(printTime, 1000);
1 Odpowiedź
+ 1
store hours, minutes and secs varibles in a new variable named time then put it in the container