add an element in the DOM
I realise this page on html
my js:
the problem he span elemnt don't appear on the html ?
can get some idea to fix it
5 Replies
you want to use the name of the variable on that append
not a name of a element
don t understand you
change
screen.appendChild(span);
to screen.appendChild(valeur);
nothing append
your code is producing an error earlier on (though what mannix said is still accurate)
in javascript, the datetime attribute is accessed using the dateTime property, so the first line has to be:
you should look at the javascript console in the devtools any time code doesn't work as expected, a lot of the time there will be errors that can guide you to the correct solution