JSFiddle - React, Tailwind, and code Playground
by tamtakoe
HTML
<input type="text" id="myText" value="Some text for testing"/>
<button onclick="Select1()">Select the second character!</button>
JavaScript
function Select1() {
var input = document.getElementById ("myText");
input.selectionStart = input.value.length;
}