JSFiddle - React, Tailwind, and code Playground

by Alexis LĂłpez Espinoza

HTML

<form>
	<input type="text" value="A" />
	<input type="text" value="B" />
	<input type="text" value="C" />
</form>

JavaScript

document.addEventListener("click", function(event){
    (event.target.tagName == "INPUT" && event.target.type == "text") && select(event.target.value);
}, false);

function select(value){
	alert(value);
}