Use maxLength property to set maximum limit in a textbox.
Sample code is shown below-
var ele = document.getElementById('txt');
ele.maxLength = 5;
Making developer's life easy
Use maxLength property to set maximum limit in a textbox.
Sample code is shown below-
var ele = document.getElementById('txt');
ele.maxLength = 5;
He is a Salesforce Certified Application Architect having 11+ years of experience in Salesforce. View more posts