<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>cupload例子</title> </head> <body> <p>多图上传(3张)</p> <div id="cupload-2"></div> <button type="button" id="addtupian">哗啦啦</button> </body> <script src="jquery.min.js"></script> <script src="cupload.js"></script> <script type="text/javascript"> var cupload2 = new Cupload ({ ele: '#cupload-2', num: 3, data : ["https://dss2.bdstatic.com/8_V1bjqh_Q23odCf/pacific/1962052430.jpg"], }); $(function () { $("#addtupian").click(function(){ console.log(cupload2); cupload2.localValue.data.push("https://dss2.bdstatic.com/8_V1bjqh_Q23odCf/pacific/1914110548.png","https://dss2.baidu.com/6ONYsjip0QIZ8tyhnq/it/u=3554982299,3562031081&fm=5"); cupload2.showImagePreview(); }); }); </script> </html>