JSFiddle - React, Tailwind, and code Playground
by Trufa
HTML
<form>
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
</form>
<p>action</p>
JavaScript
$('input[name="lastname"]').focus();
$('p').click(function(){
$('input').first().focus();
});