0
What is the problem with this code
I don't know what is the problem https://code.sololearn.com/WR35uYakF4Oo/?ref=app
3 Answers
0
So what's happening is that the JavaScript code loads first, so it doesn't have access to the elements on the web page. You can do this to prevent an error:
window.onload = function()
{
document.getElementById("hours").innerHTML = calalc(x);
}
This basically runs the code inside it once the window fully loads, including HTML.
0
This is my code đđ»đđ»đđ»đđ»đđ»