js
var fileDom = document.getElementById("excelFile");
var infoBoxDom = document.getElementById('info_box');
function upload(json){
console.log(json);
var file_app_id = json.file_app_id;
var file_serial_no = json.file_serial_no;
var imgUrl = "../../img/del_icon.png";
var downloadUrl = scheme+'://'+host+':'+port+'/'+download_path+'?file_app_id='+file_app_id+'&file_serial_no='+file_serial_no;//下载地址
var picUrl = scheme+'://'+host+':'+port+'/'+preview_path+'?file_app_id='+file_app_id+'&file_serial_no='+file_serial_no;//预览地址
$('#info_box').append(
"<tr id='"+file_serial_no+"'>" +
"<td align='left'><label hidden id='"+downloadUrl+"' name='"+json.origin_file_name+"'>"+picUrl+"</label>"+json.origin_file_name+"</td><td align='right'>"+
"<input type='button' id='"+file_serial_no+"_b' style='width: 20px; height: 20px;background-image: url("+imgUrl+") ; background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;margin-top: 3px; position: absolute;' onclick='delImgFsm(\""+file_serial_no+"\")' />"+
"</tr>"
);
}
function delImgFsm(fileNo){
$("#"+fileNo).remove();
}
html
<tr id="divShow">
<td></td>
<td>
<div id="info_box"></div>
</td>
</tr>
<tr>
<td align='right'>
<label for="excelFile">附 件:</label>
</td>
<td>
<input name="excelFile" id="excelFile" for="fsmUpload"
upload-user-id="3566" upload-resp-org-id="111" upload-ref-doc-id="" upload-hidden-input-id="" multiple
upload-file-app-id="amc_app" upload-form-id="form_amc_law_material" upload-api-url="地址"
upload-api-prefix="地址" callback_url="" image_id="" serial_no_input_id=""
callback_function="window.upload" type="file">
</td>
</tr>