+ 3
Why is there an error?
3 Answers
+ 5
window.onload = function(){
var sec = document.getElementsByTagName("section");
sec[0].innerHTML = "Hello";
}
+ 2
U didn't place parentheses in your function..
And getElementsByTagName..
Its elements not element
0
window.onload = function{
var sec=document.getElementByTagName("section");
sec[0].innerHTML="Hello";
}