I have a field that accepts 4 digits, I would like, after completing the field, when changing to another field, if the 4 digits are not entered, the field is auto-completed with leading zeros.
What would a JavaScript function look like? And how to call it inside the TextBox below?
Field:
<telerik:RadTextBox ID="txtAgencia" runat="server" Width="80px" MaxLength="4" NumberFormat-DecimalDigits="0" onblur="caractNaoPermit(this, 'numeric'); formatCamp(this,'numeric');" onkeypress="return(validaConteudo(event, this, 'numeric'))" onfocus="removeCaracs(this,'numeric')" />