-
JS 判断文件是否是图片
2015-12-22 09:25var fileInput = document.getElementById('file'); fileInput[0].files.type.indexOf('png/jpg/xxxx') != 0;
这样也行吧
var fileInput = document.getElementById('file');
fileInput[0].files.type.indexOf('png/jpg/xxxx') != 0;
这样也行吧