Input URL maxLength Attribute
Definition and Usage
maxLength
Set or return the value of the maxLength attribute of the URL field.
The HTML maxLength attribute specifies the maximum number of characters allowed in the URL field, with a default value of 524288.
Tip:To set or return the width of the URL field (in characters), use size Attribute.
See also:
HTML Reference Manual:HTML <input> maxlength na Ating Pansamantalang Gamit
Example
Example 1
Get the maximum number of characters allowed in a specific URL field:
var x = document.getElementById("myURL").maxLength;
Example 2
Set the maximum number of characters allowed in the URL field:
document.getElementById("myURL").maxLength = "8";
Syntax
Return maxLength attribute:
urlObject.maxLength
Set maxLength attribute:
urlObject.maxLength = number
Halaga ng Ating Paglalarawan
Halaga | Paglalarawan |
---|---|
number | Nagpapatibay ng pinakamataas na bilang ng character na pinahihintulutan sa URL field. Ang default na halaga ay 524288. |
Detalye ng Teknolohiya
Halimbawa ng Balyo: | Numero, ipinapakita ang pinakamataas na bilang ng character na pinahihintulutan sa URL field. |
---|
Suporta ng Browser
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Sumusuporta | 10.0 | Sumusuporta | Hindi Sumusuporta | Sumusuporta |