js获取文件后缀名方法
作者:互联网
参考链接:https://blog.csdn.net/zhenyu5665/article/details/72829971
var fileName = "www.aaa.com/index.html"; 方法1 var fileExtension = fileName.substring(fileName.lastIndexOf('.') + 1); 方法2 var fileExtension =fileName.substring(fileName.length-3,fileName.length).toLowerCase(); 方法3 var fileExtension = fileName.split('.').pop().toLowerCase();
标签:fileExtension,toLowerCase,length,fileName,后缀名,获取,substring,var,js 来源: https://www.cnblogs.com/beileixinqing/p/12420246.html