JSFiddle - React, Tailwind, and code Playground

by GeoForce

HTML

<input type="text" id="my_textbox" value="My Text" />
<button id="my_button">Focus</button>

JavaScript

document.getElementById('my_button').onclick = function() {
    document.getElementById('my_textbox').focus();
};