[Javascript] form field maxlength

Håkan Magnusson hakan at backbase.com
Tue Mar 2 04:54:54 CST 2004


The value is stored in the maxLength property of the input.

document.MyForm.MyTextBox.maxLength

Regards,
H

Paul McGuire wrote:

> I have a form called MyForm
> 
> a textbox called MyTextBox
> 
> it has a MaxLength of 20
> 
> How do I access the MaxLength attribute of this form via JavaScript
> programatically?
> 
> I imagine it will be something like
> 
> document.MyForm.MyTextBox.maxlength.value
> 
> but that does not work
> 
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 



More information about the Javascript mailing list