MCQs > IT & Programming > JavaScript > What's the output? var a = document.getElementById('id1'); a.onclick = function1();

JavaScript MCQs

What does the following code snippet do?

var a = document.getElementById('id1');
a.onclick = function1();


Answer

Correct Answer: It executes function1 and returns its value to onclick attribute of id1 tag.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More JavaScript MCQ Questions

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it