maxlength无效时;限制input type="number"的长度

<input type="number" oninput="if(value.length>11)value=value.slice(0,11)" placeholder="请输入联系方式" />

猜你喜欢

转载自blog.csdn.net/qiuqiang748/article/details/88735069