<form>
<select id="myFormControl">
<option id="o1">Opt 1</option>
<option id="o2">Opt 2</option>
</select>
</form>HTMLSelectElement: item() method / notebook
HTMLSelectElement: item() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
// Returns the HTMLOptionElement representing #o2
elem1 = document.forms[0]["myFormControl"][1];