 <p>example for U!</p> <pre><code>jQuery(function($) { //文件上传 $(".dropzone").dropzone({ url : "pic_upload.jsp?id=&lt;%=request.getParameter("id")%&gt;", addRemoveLinks : true, dictRemoveLinks : "x", dictCancelUpload : "x", maxFiles : 5, maxFilesize : 5, acceptedFiles: "image/*", init : function() { //上传成功处理函数 this.on("success", function(file) { alert("修改前:"+file.name); }); this.on("removedfile", function(file) { alert("File " + file.name + "removed"); //ajax删除数据库的文件信息 $.ajax({ type:'post', url:'pic_delete.jsp?id='+file.name , cache:false, success:function(data){ } }); }); &lt;% if(null!=list){ for(PlaceImg img:list){%&gt; //add already store files on server var mockFile = { name: "&lt;%=img.getId()%&gt;", size: &lt;%=img.getFilesize()%&gt; }; // Call the default addedfile event handler this.emit("addedfile", mockFile); // And optionally show the thumbnail of the file: this.emit("thumbnail", mockFile, "&lt;%=img.getImgUrl()%&gt;"); &lt;%} }%&gt; } }); </code></pre>