JSFiddle - React, Tailwind, and code Playground

by Andrew Holloway

HTML

<select id="select">
  <option id="1" value="1">one</option>
  <option value="2">two</option>
  <option value="3">three</option>
  <option value="4">four</option>
</select>

JavaScript

document.getElementById('select').onclick = () => console.log('click')
document.getElementById('select').onchange = () => console.log('changed')
document.getElementById('1').onclick = () => console.log('test 2')
document.getElementById('select').oninput = () => console.log('inputted');