An error occurs in JS with the code below:
document.getElementById("p1").innerHTML = "New text!";
I tested different ways like this line and think there is a problem with innerHtml
. I even copied some code but again an error:
Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') what should I do?