cupload.js手动插入数据
<!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>
作者:沐雪
文章均系作者原创或翻译,如有错误不妥之处,欢迎各位批评指正。本文版权归作者和博客园共有,如需转载恳请注明。
如果您觉得阅读这篇博客让你有所收获,请点击右下方【推荐】
为之网-热爱软件编程 http://www.weizhi.cc/