MCQs > IT & Programming > JQuery > Correct way to get 'Option B' with the value '2' from following HTML code in jQuery?

JQuery MCQs

Which of the following is the correct way to get "Option B" with the value '2' from following HTML code in jQuery? <select id='list'> <option value='1'>Option A</option> <option value='2'>Option B</option> <option value='3'>Option C</option> </select>

Answer

Correct Answer: $("#list option[value='2']").text();

Explanation:

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

JQuery Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JQuery Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it