TheConeHead
Programmer
How can I check the "text" of a select option as opposed to the value?
![[conehead] [conehead] [conehead]](/data/assets/smilies/conehead.gif)
![[conehead] [conehead] [conehead]](/data/assets/smilies/conehead.gif)
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
document.forms["formName"].elements["selectBoxName"].options[i].text
document.forms["formName"].elements["selectBoxName"].options[[!]document.forms["formName"].elements["selectBoxName"].selectedIndex[/!]].text
var dfe = document.forms["formName"].elements["selectBoxName"];
var txt = dfe.options[dfe.selectedIndex].text
(sel = document.forms["formName"].elements["selectBoxName"]).options[sel.selectedIndex].text