MCQ
Single Best Answer
Easy
QWhat would the following JavaScript code produce?
function counth2()
{
var totalh2=document.getElementsByTagName("h2");
alert("totalh2.length);
}
hello
hello
hello
hello
ID: #5084
Javascript DOM & Event Handling MCQ
118 views
Question Info
#5084Q ID
EasyDifficulty
Javascript DOM & Event Handling MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option D
Explanation
All elements with the supplied tag name are returned by the document.getElementsByTagName() function.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic