<input id="file" type="file" accept=".xls,.xlsx" style="width: 220px;" onchange="editType();"/>
    function editType(){
            let file=$("#file").val();
            if(!file){
               let filename=file.substr(file.lastIndexOf("."));
                 if(filename!='.xls'){
                       alert("请上传xls格式的文件");
                     }

                }
        }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2021-05-22
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案