<input type="text" name="id1" maxlength="3" >实际输入的长度:document.all.id1.length;
最大长度:document.all.id1.maxLength;