JSFiddle - React, Tailwind, and code Playground
HTML
<form action="" method="get" id='form1'>
<input type="text" name="search" id="search" />
<input type="submit" value="submit" onclick="convert()" />
</form >
JavaScript
function convert()
{
alert("hi");
document.getElementById("search").value = document.getElementById("search").value.toLowerCase();
return true;
}