这几天学习过程中学习了上传文件,在这儿总结一下吧!
<div>
<a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-print" plain="true" οnclick="addAttach()" style="color:#000;">文件上传</a>
</div>
通过一个超链接弹出一个js弹窗并进行文件的上传功能
<div class="easyui-window" id="import-excel-template" title="文件上传" style="width:400px;height:180px;padding:2px;" closed="true">
<form id="importFileForm" method="post" enctype="multipart/form-data" style="display:none">
<table style="margin:5px;height:70px;border:0;">
<tr >
<td>文件名称</td>
<td><input class="easyui-textbox" name="c_Name" id="c_Name" style="width:260px;height:30px;" data-options="required:true"></td>
</tr>
<tr >
<td>请选择文件</td>
<td>
<input style="width:260px;height:30px;" class="easyui-filebox" id="fileImport" name="fileImport"
data-options="buttonText:'浏览',prompt:'请选择要上传的文件(50M以内)....'">
</td>
</tr>
</table>
<di