To remove focus from a select you need to use the built-in method called “blur()”.
Let’s understand with an example:-
Let’s assume we have a select component with the id “cars” and name “cars” and we want to remove focus whenever we choose an option from the select.
<select name="cars" id="cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select>
This is how you will use blur():
You should use this code inside the “onChange()” event of the dropdown list. This code will help to remove the focus or selection from the dropdown list when the user selects a new option.