Given the following code:
<select name='starttime' onChange='cells(this);'><option value='1'>2004Q1</option><option value='2'>2004Q2</option></select> <select name='endtime' onChange='cells(this);'><option value='48'>2015Q4</option><option value='47'>2015Q3</option></select> How can I access the text of say, the option with value = 1 of the "starttime" <select> (i.e. 2004Q1)? I can access the value of this element by using the following jQuery code:
$('[name=starttime]').val() However, I'd like to instead specify a value and name, and get the associated text.
<label>element appears athtmlat Question..textContentis not a "label" that am aware of. Can you link to documentation of<option>.textContentreferenced as "the "label""?