input只能输入数字并限制长度

xiaoxiao2021-02-28  22

/*在谷歌下移除input[number]的上下箭头*/ .regis_box input[type='number']::-webkit-outer-spin-button, .regis_box input[type='number']::-webkit-inner-spin-button{ -webkit-appearance: none !important; margin: 0; } /*在firefox下移除input[number]的上下箭头*/ .regis_box input[type="number"]{-moz-appearance:textfield;} <input type="number" oninput="if(value.length>11)value=value.slice(0,11)"class="form-control regis_inp" placeholder="请输入手机号码">
转载请注明原文地址: https://www.6miu.com/read-1949998.html

最新回复(0)