需求
需求分析
现有批量上传的需求,通过上传Excel文件,获取用户uidList
流程分析
- 页面Excel文件输入框
<tr>
<td>批量文件:</td>
<td><input type="file" id="idFile" name="idFile" class=" " /></td>
</tr>
- 输入框事件
//上传 excel文件
function importExcel(formData) {
$.ajax({
url: "lehai/giveMedalToUserAction!readUserIdList",
type: 'POST',
cache: false,
data: formData,
dataType : "json",
processData: false,
contentType: false
}).done(function(msg) {
if (msg.result == 1) {
}
if (msg.result == 0) {
showMessage(""+msg.resultText );
$("#idFile").val("");
}
}).fail(function(msg) {
showMessage("读取错误!");
});
}
//选择文件事件
$("#idFile").change(function(){
$("#roomid").val("");
$("#showid").val("");
<
2895



被折叠的 条评论
为什么被折叠?



