JSFiddle - React, Tailwind, and code Playground

by defuseer

HTML

<select onchange=foo(this)>
<option value="1" id="1">kjkjkjkj</option>
  <option value="2" id="0">kjkjkj
	</option>
	</select>

JavaScript

function foo(select) {
   alert(select.options[select.selectedIndex].getAttribute("myid"));
}