保存进度!

This commit is contained in:
2022-10-31 18:01:26 +08:00
parent a89f773825
commit fe484c0eec
2 changed files with 7 additions and 2 deletions

View File

@@ -67,6 +67,7 @@
const xhr = new XMLHttpRequest();
//处理进度
xhr.upload.onprogress = function (event) {
if (event.lengthComputable) {
let percent = Math.round(
@@ -77,6 +78,7 @@
}
};
//传送完成
xhr.onload = function (event) {
console.log(xhr.responseText);