document.getElementById(frmObj.id).value=\"\"; document.getElementById(frmObj.id).autofocus; document.getElementById(\"errorMsg\").innerHTML = \"Only numeric value i
Inside the input tag you can add autoFocus={true} for anyone using jsx/react.
setEmail(e.target.value)} value={email} placeholder={"Email..."} autoFocus={true} />