Let's say I have an input with an id
<input type="text" id="inPut">
and a button
<button onclick="myFunc()"></button>
How do I write a function (with simple javascript) such that onclick of the button, the input is focused?
This is a pretty basic solution...
But you could use the focus method...
https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus
function myFunc() {
document.getElementById("inPut").focus();
}