Input Password maxLength Attribute

Definition and Usage

maxLength Set or return the value of the maxlength attribute of the password field property.

The HTML maxlength attribute specifies the maximum number of characters allowed in the password field.

Tip:To set or return the width of the password field (in characters), use size attribute

See also:

HTML Reference Manual:HTML <input> maxlength প্রতিযোগিতা

Example

Example 1

Get the maximum number of characters allowed in the specified password field:

var x = document.getElementById("myPsw").maxLength;

Try it yourself

Example 2

Set the maximum number of characters allowed in the password field:

document.getElementById("myPsw").maxLength = "10";

Try it yourself

Syntax

Return maxLength attribute:

passwordObject.maxLength

set maxLength attribute:

passwordObject.maxLength = integer

প্রতিযোগিতা মূল্য

মূল্য বর্ণনা
integer পাসওয়ার্ড ফিল্ডে অনুমতি দেওয়া হওয়া মাক্সিমাম অক্ষর সংখ্যা নির্দিষ্ট করুন

প্রযুক্তিগত বিবরণ

ফলাফল সংখ্যা, যা পাসওয়ার্ড ফিল্ডে অনুমতি দেওয়া হওয়া মাক্সিমাম অক্ষর সংখ্যা

ব্রাউজার সমর্থন

চ্রোম এডজ ফায়ারফক্স স্যাফারি অপেরা
চ্রোম এডজ ফায়ারফক্স স্যাফারি অপেরা
সমর্থন সমর্থন সমর্থন সমর্থন সমর্থন