How do you select a particular option in a SELECT element in jQuery?

How do you select a particular option in a SELECT element in jQuery?

Ankur Rajput
Asked 11-11-2024
131

Answer (1)
$('#id1 option[value="'+id+'"]').prop('selected', true);
Deepak Sharma
Asked 28-06-2018
45 Likes
Comments
Write comment

Submit your answer