HTML:-

Name:
<input id=”txtName” name=”txtName” type=”text” value=”” />

jQuery:-

jQuery(“#txtName”).keypress(function () {
var Nval = jQuery(“#txtName”).val();
var Ntxt = Nval.charAt(0).toUpperCase() + Nval.slice(1);
jQuery(“#txtName”).val(Ntxt);
})

Your Answer
Login
Enter email and password to comment or answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.