type-file - input type=file 的 maxLength是多少
本文介绍了type-file - input type=file 的 maxLength是多少的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
var input = document.querySelector("[type=file]");
input.addEventListener('change', function (e) {
var maxLength = this.maxLength;
console.log(maxLength);//524288
}, false);
这里的maxLength是浏览器支持的type=file的最大值吗
解决方案
maxlength和minlength支持的type类型为:text,tel,url,email,password,以及search。当type=file时,maxlength是没有效果的,标准如下:
这篇关于type-file - input type=file 的 maxLength是多少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文