innerhtml getelementbyID wont work code example Example: innerhtml doesn't work document.getElementById("test").innerHTML="foo";