操作规程
This commit is contained in:
parent
e54c109907
commit
16fb63aa79
|
@ -251,20 +251,12 @@
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
var filetypes = [".txt", ".ppt", ".doc", ".pdf", ".pptx", "docx", ".ppt"];//判断上传文件格式类型
|
var filetypes = [".txt", ".ppt", ".doc", ".pdf", ".pptx", ".docx", ".ppt"];//判断上传文件格式类型
|
||||||
var filepath = target.value;
|
var filepath = target.value;
|
||||||
if (filepath) {
|
if (filepath) {
|
||||||
var isnext = false;
|
var isnext = false;
|
||||||
var fileend = filepath.substring(filepath.indexOf("."));
|
var fileend = filepath.substring(filepath.indexOf("."));
|
||||||
if (filetypes && filetypes.length > 0) {
|
if (filetypes.indexOf(fileend)==-1) {
|
||||||
for (var i = 0; i < filetypes.length; i++) {
|
|
||||||
if (filetypes[i] == fileend) {
|
|
||||||
isnext = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!isnext) {
|
|
||||||
alert("不接受此文件类型!");
|
alert("不接受此文件类型!");
|
||||||
target.value = "";
|
target.value = "";
|
||||||
$("#videoName").text('文件格式不支持,请重新选择上传文件!');
|
$("#videoName").text('文件格式不支持,请重新选择上传文件!');
|
||||||
|
|
Loading…
Reference in New Issue