1

I have a dropdown on my html page, when it is first loaded, it is set to a default value. But when a user changes the value, I'm checking the selected value against another text field. If the condition does not satisfy, I want to show an alert to the user and reset the dropdown.

I'm able to show the alert with my condition, but how do I reset the dropdown after showing an alert to the user.

0

1 Answer 1

2

You can try

document.getElementById("#dropdownId").selectedIndex = 0
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.