1 $.ajax ({2URL: "/flow/usertaskfileshow.cc",3Data: {"Processdefinitionid": Pdid, "Processinstanceid": PID, "TaskId": N.taskid},4DataType: "JSON",5Cachefalse,6Successfunction(response) {7 varTipcontent = "<table>";8 if(Response! =NULL) {9 if(Response.filelist! =NULL) {Ten$.each (Response.filelist,function(i, k) { One if(k) { A //Manual Download -Tipcontent + = "<tr><td style= ' padding:0 18px; Width:200px;overflow:hidden; ' > "+ k +" </td><td style= ' padding:5px;width:124px;text-align:right; ' ><a data-filename= ' + k + "' data-taskid= '" + n.taskid + "' href= ' # ' class= ' user_task_upload ' > Downloads </a> </td></tr> "; - } the }); - } - if(Response.remark! =NULL) { -$ ("#user_task_remark"). HTML (""); +$ ("#user_task_remark"). HTML ($ ("<span>" + Response.remark + "</span>")) - } + } ATipcontent + = "</table>"; at$ ("#user_task_file"). HTML (""); -$ (tipcontent). AppendTo ($ ("#user_task_file")); - + } -});
Ajax request data Dynamic rendering table