+ 1
Help!
https://code.sololearn.com/W6233V66Bw5D/?ref=app... It's not showing anything when I run it.. Why?
7 Réponses
+ 3
but it would still remove any future html you add using that method. you could either edit a element innerhtml other than body or something like this:
var child = document.createElement("P");
window.onload = function (){
document.body.appendChild(child);
}
function printTime() {
var d = new Date();
var hours = d.getHours();
var mins = d.getMinutes();
var secs = d.getSeconds();
child.innerHTML = hours+":"+mins+":"+secs;
}
setInterval(printTime, 1000);
+ 14
are you running the code from the app or website?
if on the app restart the app then try again.
if on website reload the page then try again.
it works fine here.
+ 4
It works fine!
+ 3
It works after restarting the app
+ 2
It worked without a reload for me