JSFiddle - React, Tailwind, and code Playground

by avgustre

HTML

<input type="text" name="Thing" value="" />

JavaScript

window.onload = function () {
    
    /* event listener */
    document.getElementsByName("Thing")[0].addEventListener('input', doThing);
    
    /* function */
    function doThing(){
       alert('Horray! Someone wrote "' + this.value + '"!');
    }
    
}