input type number maxlength
input type为数字(number)类型时maxlength属性不起作用
js解决方案
<input type="number" name="phone" id="getCode" placeholder="请填写手机号码" maxlength='11'>
$('#getCode').bind('input propertychange', function () {
if ($(this).attr("type") == "number") {
/
原创
2020-07-09 11:19:10 ·
189 阅读 ·
0 评论