MCQs > IT & Programming > JQuery > Correct way to select an option based on its text in jQuery?

JQuery MCQs

Which of the following is the correct way to select an option based on its text in jQuery?

Answer

Correct Answer: $("#myselect option").filter(function(){ return $(this).text() == 'text';}).prop('selected', true);

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