select option in javascript code example
Example 1: get index of selected option javascript
$("#sel").attr("selectedIndex")
// or
$("#sel")[0].selectedIndex
//or
$(this).prop('selectedIndex')
Example 2: js select option in form
<form name="AddAndEdit">
<select name="list" id="personlist">
<option value="P1">Person1</option>
<option value="P2">Person2</option>
<option value="P3">Person3</option>
</select>
</form>