Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript select option value onchange

<select id="comboA" onchange="getComboA(this)">
  <option value="">Select combo</option>
  <option value="Value1">Text1</option>
  <option value="Value2">Text2</option>
  <option value="Value3">Text3</option>
</select>

function getComboA(selectObject) {
  var value = selectObject.value;  
  console.log(value);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #select #option #onchange
ADD COMMENT
Topic
Name
6+4 =