表单中,增加单个上传附件功能
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
2、AttachmentManager.java新增方法
?
?
?
3、CarInfoAction.java 添加修改,新增和删除的附件方法,并引用
?
在Action中添加方法?
?
?
在action的新增区域调用?
?脚本控制上传输入框的显示与隐藏//显示文件上传控件function showupload() {document.getElementById("a_xz").style.display = "none";document.getElementById("a_cxsc").style.display = "none";document.getElementById("input_file").style.display = "inline";document.getElementById("input_fh").style.display = "inline";document.getElementById("stuff_cz").value = "1";}//返回function fh(){document.getElementById("a_xz").style.display = "inline";document.getElementById("a_cxsc").style.display = "inline";document.getElementById("input_file").style.display = "none";document.getElementById("input_fh").style.display = "none";document.getElementById("stuff_cz").value = "";}//下载附件到本地function downloadsave(unid){ window.open('<%=request.getContextPath()%>/downloadFile?readType=db&unid=' + unid);}??