最大长度为 10 个字符的 <input> 元素:
< form action = "demo_form.php" > Username: < input type = "text" name = "usrname" maxlength = "10" >< br > < input type = "submit" value = "提交" > </ form > |
所有主流浏览器都支持 maxlength 属性。
maxlength 属性规定 <input> 元素中允许的最大字符数。
无。
< input maxlength = "number" > |
值 | 描述 |
---|---|
number | 在 <input> 元素中允许的最大字符数。 |
在线实例
字符集 & 工具
最新更新
站点信息
关注我们