JSFiddle - React, Tailwind, and code Playground

HTML

<form name="form1" method="post">
<table name="tabla1">
<tr>
<td name="celda1">
<input type="text" name="prueba1" value="" onchange="prueba2();"/></td>
</tr>
</table>
</form>

JavaScript

function prueba2() {
   var a = document.form1.prueba1.value;
    alert(a);    
}