插件地址:
https://sunxiaomingatcn.github.io/SXM_DEMO/fileReader/index.html
打印当前所有file
使用方法 引入css
引入脚本 创建实例 var imageFile = new readImage({ Multiselect: true, //Boolean 允许多选,非必传,默认false id: "file1", //自定义input file的id,非必传,默认body unInitialization: false, //Boolean 不直接初始化,非必传,默认false,可调用init方法初始化imageFile.init() maxNum: 4, //限制最大上传图片数量,非必传 Container: ".box", //上传容器,必须传值 readImageCallBack: function(file, base64Image, domImg) {} //每次预览后回调函数,传回三个参数,文件file对象、base64对象、dom对象 }) imageFile.getAllFile方法返回当前所有file