on-internet
← Community

How can I check if a specific option exists in a select box?

Stack Overflow ·

I have the HTML code below: <select> <option>Volvo</option> <option>Saab</option> <option>Mercedes</option> <option>Audi</option> </select> How can I check whether or not the text 'Hyndai' is in the list of options.

Comments

Sign in or sign up to comment and upvote.

No comments yet.