javascript select option selected

rev 2021.1.15.38327, Stack Overflow works best with JavaScript enabled, Where developers & technologists share private knowledge with coworkers, Programming & related technical career opportunities, Recruit tech talent & build your employer brand, Reach developers & technologists worldwide, a javascript only solution would have been better. So, in modal bootstrap / express node js / aws beanstalk, this worked for me: Where my select ID = "cJourney" and the drop down value was stored in variable: vcJourney, To set value in JavaScript using set attribute , for selected option tag. To remove the Options from Select list, you need to assign NULL value to the option you want to delete. The read-only HTMLSelectElement property selectedOptions contains a list of the