0
Code doesnt work
why is it my date code "try it yourself" example doesnt show any output on screen?
5 odpowiedzi
+ 3
show us the code.. at the moment my answer would be: because unicorns don't like dwarves
+ 3
me.. nope.. someone will be along shortly to help out I am sure
+ 1
thanks anyway...it is working now...i have set an alert box and due to the intervel it takes time to show up on my screen..
0
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);
this is the code given in the chapter
0
ooh can you help me to code it..i am new to this..thanks in advance