Javascript Reference
Categories: InputTypePassword

javascript InputTypePassword maxLength

@March 15, 2008, 1:22 a.m.
maxLengthFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  

Read/Write  

Specifies the maximum number of characters that may be typed into a password field input element. In practice, browsers beep or otherwise alert users when a typed character would exceed the maxLength value. There is no innate correlation between the maxLength and size properties. If the maxLength allows for more characters than fit within the specified width of the element, the browser provides horizontal scrolling (albeit awkward for many users) to allow entry and editing of the field.

 
Example
 
document.entryForm.myPassword.maxLength = 35;
 
Value

Integer value.

 
Default

Unlimited.


Powered by Linode.