JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="foo" onclick="myonclick()"/>

JavaScript

function myonclick(){
 alert("geklickt");   
};