This commit is contained in:
parent
a6c7571ccc
commit
08e42ae7ad
|
@ -128,7 +128,7 @@
|
|||
<a class="list" href="javascript:;">
|
||||
<input id="file" type="file" name="myfile" onchange="UpladFile();" /><span>选择文件</span>
|
||||
</a>
|
||||
<button class="btn" type="button" onclick="sub();">上传</button>
|
||||
|
||||
|
||||
</p>
|
||||
<!--显示消失-->
|
||||
|
@ -215,13 +215,6 @@
|
|||
$(".el-upload-list").css("display", "block");
|
||||
$(".el-upload-list li").css("border", "1px solid #20a0ff");
|
||||
$("#videoName").text(fileObj.name);
|
||||
} else {
|
||||
alert("请选择文件");
|
||||
}
|
||||
}
|
||||
|
||||
/*点击提交*/
|
||||
function sub() {
|
||||
var fileObj = document.getElementById("file").files[0]; // js 获取文件对象
|
||||
if (fileObj == undefined || fileObj == "") {
|
||||
alert("请选择文件");
|
||||
|
@ -245,7 +238,12 @@
|
|||
oloaded = 0; //设置上传开始时,以上传的文件大小为0
|
||||
};
|
||||
xhr.send(form); //开始上传,发送form数据
|
||||
} else {
|
||||
alert("请选择文件");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//上传进度实现方法,上传过程中会频繁调用该方法
|
||||
function progressFunction(evt) {
|
||||
|
|
Loading…
Reference in New Issue