Question: how to keep selected value in dropdown using jquery?
Answer: Used Function: Example 1: This example uses val() function to set the option corresponding to the passed value. Output: Example 2: This example uses attr() function to assign the selected attribute to the corresponding option. Output: