Easy Tutorial
❮ Prop Script Character Jsref Reduce ❯

Input URL maxLength Property

Input URL Object

Example

Get the maximum number of characters allowed in the URL field:


Definition and Usage

The maxLength property is used to set or return the maxlength attribute of the URL field.

The maxLength property describes the maximum number of characters allowed in the URL field.

The default value is 524288.

Tip: If you need to set the length of the URL, i.e., the number of characters, use the size property.


Browser Support

All major browsers support the maxLength property.

Note: Internet Explorer or Safari do not support the HTML <input> element with the type="url" attribute.


Syntax

Return the maxLength property:

Set the maxLength property:

Property Values

Value Description
number Describes the maximum number of characters allowed in the URL field. Default value is 524288

Technical Details

| Return Value: | A number, representing the maximum number of characters allowed in the URL field. | | --- | --- |


More Examples

Example

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


Related Pages

HTML Reference: HTML <input> maxlength Attribute


❮ Prop Script Character Jsref Reduce ❯