Browse Source

文件上传的方法中,等到上传成功或失败后,再移除input元素,避免上传没有反应

sunyj 8 years ago
parent
commit
6b7da1695d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/webapp/resources/js/util/utils.js

+ 1 - 1
src/main/webapp/resources/js/util/utils.js

@@ -112,6 +112,7 @@ function upload(option) {
 						option.error(xhr);
 						option.error(xhr);
 					}
 					}
 				}
 				}
+				document.body.removeChild(input);
 			}
 			}
 		}
 		}
 		// 展示加载动画
 		// 展示加载动画
@@ -127,7 +128,6 @@ function upload(option) {
 		}
 		}
 		xhr.send(formData);
 		xhr.send(formData);
 	}
 	}
-	document.body.removeChild(input);
 }
 }
 
 
 /**
 /**