0
I want to get the text inside the tag <option>TEXTO</option>
. The situation is as follows:
<select xmlns="http://www.w3.org/1999/xhtml" id="page1:form_section:form1:selectListCampus" name="page1:form_section:form1:selectListCampus" class="form-control" size="1" onchange="OnChange_Campus(this);"><option value="">Selecionar uma Opção</option><option value="a0PA0000007bDQ7MAM" selected="selected">Exemplo 1</option><option value="a0PA0000007bDQCMA2">Exemplo 2</option></select>
I’ve tried to document.getElementById('page1:form_section:form1:selectListCampus').innerText
to rescue the text "Example 1", but without success.
But you’ll do what with that amount ?
– Atila Silva
Which
<option>
? There are three...– D. Pardal
Allan, I want to save it in a variable to store in the cookie.
– Benjamim William L. Nunes
D. Sparrow, I need "Example 1" and "Example 2"
– Benjamim William L. Nunes