Grab the RSS feed

Set maxLength Using Javascript

Hello friends,

Sometimes we need to set the maxlength for textbox or textarea depend upon the value selected.
For example if you select the country then we need to set the zip code length depend upon the country.
If the country selection is depend upon the ajax it is easy to set the length.

For example in US the zip code contain only 5 characters.But in india this going to be six.
It is simple and easiest way in the javascript.Set the maximum length by using the following code...

  
document.getelementid('textbox1").maxLength=10

Click Here to download as PDF format..

Leave the comment to improve us...

0 comments:

  •  
    Real Time Web Analytics