Set selected value. It seems that in CRM 2015 or 2015 SP1 Microsoft modified the way that the Status Reasons are handled, and although the field might seem like an Option Set, the Option Set … In JavaScript, selectedIndex property is used to set the value of a select box element. I want to populate it with an array. When you click the button, you can see the color "Orange" is selected. The selectedIndex property sets or returns the index of the selected option in a drop-down list. I have a select element on my HTML page. Specifies the option to add. To trigger the change event, you can call the .change() or .trigger("change") method after setting the value.. Alternatively, you can use the .prop() method to set the selectedIndex property which reflects the index of the selected