document.getElementById(frmObj.id).value=\"\";
document.getElementById(frmObj.id).autofocus;
document.getElementById(\"errorMsg\").innerHTML = \"Only numeric value i
In JavaScript first focus on the control and then select the control to display the cursor on texbox...
document.getElementById(frmObj.id).focus();
document.getElementById(frmObj.id).select();
or by using jQuery
$("#textboxID").focus();
In my experience
document.getElementById(frmObj.id).focus();
is good on a browser running on a PC. But on mobile if you want the keyboard to show up so the user can input directly then you also need:
document.getElementById(frmObj.id).select();