JSFiddle - React, Tailwind, and code Playground

by marlanga

HTML

<input id="texto" type="text" />

JavaScript

var txtTexto=document.getElementById("texto");
txtTexto.onkeyup=function(e)
{
   if(e.keyCode==13)
   {
       alert("Texto: "+this.value);
   }
}