Answers for "html onchange attribute this keyword"

2

onchange on select tag

<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>
Posted by: Guest on May-19-2020
0

javascript add function to onchange event

transport_select.setAttribute("onchange", function(){toggleSelect(transport_select_id);});
// or
transport_select.onchange = function(){toggleSelect(transport_select_id);};
Posted by: Guest on May-28-2020

Browse Popular Code Answers by Language