PrepAway - Latest Free Exam Questions & Answers

Which of the following will select the third option in the list?

Consider the following select list:

Which of the following will select the third option in the list?

PrepAway - Latest Free Exam Questions & Answers

A.
var list = document.getElementById(“numlist”);
list.selected = 3;

B.
var list = document.getElementById(“numlist”);
list.options[2].selectedIndex();

C.
var list = document.getElementById(“numlist”);
list.options.selectedIndex = 2;

D.
var list = document.getElementById(“numlist”);
list[3].selected(true);

Explanation:


Leave a Reply