Getting Options


RESETRUNFULL
<!DOCTYPE html><html><body>
   <select>
      <option id='o1' value='1'>A</option>
      <option id='o2' value='2'>B</option>
      <option id='o3' value='3'>C</option>
   </select>
   <script>
      let s = document.getElementsByTagName('select')[0];
      console.log(s.namedItem('o1').text);     // A
      console.log(s[1].value);   // 2
    </script></body></html>