Post

jQueryjQuery

k
kavya A

Posted on 20th April 2024|171 views

0
votes

Jquery Set Selected Option By Text

How can we set the selected option of dropdown in jQuery using ID?

Answers
P
jordan chris

Posted on 20th April 2024

We can utilize the prop method. We can recover the element value utilizing the ID also apply the value as the jQuery val(). Work by using the following syntax, $('select option:selected').

Improve your knowledge in Jquery from scratch using Jquery Online Course.

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos