javascript how to select only the text code example
Example: js select input contents
function selectText() {
const input = document.getElementById('text-box');
input.focus();
input.select();
}
function selectText() {
const input = document.getElementById('text-box');
input.focus();
input.select();
}