html最原始的利用属性maxlength限制用户输入长度 <input type="text" id="name" value="Mickey Mouse" size="20" maxlength="30" />